/// <summary> /// Sends a telemetry event for specific document using the existing request context /// </summary> public static void SendTelemetryEvent <T>(RequestContext <T> requestContext, TelemetryProperties telemetryProps) { Validate.IsNotNull(nameof(requestContext), requestContext); Validate.IsNotNull(nameof(telemetryProps), telemetryProps); Validate.IsNotNullOrWhitespaceString("telemetryProps.EventName", telemetryProps.EventName); Task.Factory.StartNew(async() => { await requestContext.SendEvent(TelemetryNotification.Type, new TelemetryParams() { Params = telemetryProps }); }); }
public void SetProperties(TelemetryProperties otherProperties) { foreach (var prop in otherProperties) { if (this.ContainsKey(prop.Key)) { this[prop.Key] = prop.Value; } else { Add(prop.Key, prop.Value); } } }
public TelemetryBuilder(TelemetryProperties properties) : base(properties) { }
public TelemetryProperties(TelemetryProperties properties) : base(properties) { }