/// <summary> /// Publishes event to the current telemetry pipeline /// </summary> /// <param name="action">The action being recorded</param> /// <param name="propertyBag">Associated property bag--this may be null</param> public static void PublishTelemetryEvent(TelemetryAction action, IReadOnlyDictionary <TelemetryProperty, string> propertyBag = null) { // Conversions to strings are expensive, so skip it if possible if (!IsEnabled) { return; } TelemetrySink.PublishTelemetryEvent(action.ToString(), ConvertFromProperties(propertyBag)); }
/// <summary> /// Publishes event with single property/value pair to the current telemetry pipeline /// </summary> /// <param name="action"></param> /// <param name="property"></param> /// <param name="value"></param> public static void PublishTelemetryEvent(TelemetryAction action, TelemetryProperty property, string value) { // Conversions to strings are expensive, so skip it if possible if (!IsEnabled) { return; } TelemetrySink.PublishTelemetryEvent(action.ToString(), property.ToString(), value); }
public void PublishEvent(string eventName, IReadOnlyDictionary <string, string> propertyBag) { TelemetrySink.PublishTelemetryEvent(eventName, propertyBag); }