You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, any telemetry item that implements ITelemetry but is not directly supported in the serialization pipeline is dropped.
The suggestion is to convert such telemetry item into EventTelemetry and serialize all values from this unknown telemetry item into the Properties of Dictionary<string, string> type.
This will allow delivery of custom telemetry items implementing ITelemetry interface and public void SerializeData(ISerializationWriter serializationWriter) method into Application Insights backend as Custom Events.
For insance, an event like this:
public class DmitryEvent : ITelemetry
{
public DmitryEvent()
{
this.Timestamp = DateTimeOffset.Now;
this.Context = new TelemetryContext();
this.MyMetrics = new Dictionary<string, double>();
}
public DateTimeOffset Timestamp { get; set; }
public TelemetryContext Context { get; set; }
public IExtension Extension { get; set; }
public string Sequence { get; set; }
public string DmitryField { get; set; }
public Dictionary<string, double> MyMetrics;
public ITelemetry DeepClone()
{
return new DmitryEvent() { DmitryField = this.DmitryField };
}
public void Sanitize() { }
public void SerializeData(ISerializationWriter serializationWriter)
{
serializationWriter.WriteProperty("DmitryField", DmitryField);
serializationWriter.WriteProperty("MyMetrics", MyMetrics);
}
}
Currently, any telemetry item that implements
ITelemetry
but is not directly supported in the serialization pipeline is dropped.The suggestion is to convert such telemetry item into
EventTelemetry
and serialize all values from this unknown telemetry item into theProperties
ofDictionary<string, string>
type.This will allow delivery of custom telemetry items implementing ITelemetry interface and
public void SerializeData(ISerializationWriter serializationWriter)
method into Application Insights backend as Custom Events.For insance, an event like this:
And tracked like:
Will be delivered as:
The text was updated successfully, but these errors were encountered: