Closed jordan112 closed 6 years ago
It looks like its this line
envelope.time = telemetry.time.toISOString();
within this method in the TelemetryClient.ts
/**
* Generic track method for all telemetry types
* @param data the telemetry to send
* @param telemetryType specify the type of telemetry you are tracking from the list of Contracts.DataTypes
*/
public track(telemetry: Contracts.Telemetry, telemetryType: Contracts.TelemetryType) {
if (telemetry && Contracts.telemetryTypeToBaseType(telemetryType)) {
var envelope = EnvelopeFactory.createEnvelope(telemetry, telemetryType, this.commonProperties, this.context, this.config);
// Set time on the envelope if it was set on the telemetry item
if (telemetry.time) {
envelope.time = telemetry.time.toISOString();
}
var accepted = this.runTelemetryProcessors(envelope, telemetry.contextObjects);
// Ideally we would have a central place for "internal" telemetry processors and users can configure which ones are in use.
// This will do for now. Otherwise clearTelemetryProcessors() would be problematic.
accepted = accepted && TelemetryProcessors.samplingTelemetryProcessor(envelope, { correlationContext: CorrelationContextManager.getCurrentContext() });
if (accepted) {
this.channel.send(envelope);
}
}
else {
Logging.warn("track() requires telemetry object and telemetryType to be specified.")
}
Okay, i figured it out. I didn't properly upgrade my track calls
For example, with the previous version, I had:
client.trackEvent('start', telemetry);
when it should have been
client.trackEvent({name: 'start'});
I'm using this in conjunction with Bot Framework on Node.js. Is there a ES6 polyfill that I need? It seems internal to Telemetry
Here is my setup to AppInsights