Microsoft.ApplicationInsights.DataContracts.TelemetryContext
Represents a context for sending telemetry to the Application Insights service.
Learn more
namespace Microsoft.ApplicationInsights.DataContracts
{
public sealed class TelemetryContext
{
public IDictionary<string, string> GlobalProperties { get; }
public UserContext User { get; }
public OperationContext Operation { get; }
public LocationContext Location { get; }
public CloudContext Cloud { get; }
public ComponentContext Component { get; }
public DeviceContext Device { get; }
public SessionContext Session { get; }
public TelemetryContext();
}
}
namespace Microsoft.ApplicationInsights.DataContracts
{
public sealed class MetricTelemetry : ITelemetry, ISupportProperties
{
public DateTimeOffset Timestamp { get; set; }
public TelemetryContext Context { get; }
public string MetricNamespace { get; set; }
public string Name { get; set; }
public double Value { get; set; }
public IDictionary<string, string> Properties { get; }
public MetricTelemetry(string metricName, double metricValue);
}
}