Class DefaultTelemetryFactory
The default implementation of ITelemetryFactory.
public class DefaultTelemetryFactory : ITelemetryFactory
- Inheritance
-
DefaultTelemetryFactory
- Implements
Constructors
DefaultTelemetryFactory(IServiceProvider)
Create the default instance of DefaultTelemetryFactory.
public DefaultTelemetryFactory(IServiceProvider serviceProvider)
Parameters
serviceProvider
IServiceProvider
Properties
IsTelemetryEnabled
Boolean indicating if telemetry is enabled.
public bool IsTelemetryEnabled { get; }
Property Value
Methods
Trace(string)
Start a trace represented by the returned ITelemetryTrace. The trace will end when the ITelemetryTrace is disposed.
public ITelemetryTrace Trace(string traceName)
Parameters
traceName
stringThe name of the trace.
Returns
- ITelemetryTrace
The state of the trace.
Trace(string, MessageEnvelope)
Start a trace represented by the returned ITelemetryTrace. The trace will end when the ITelemetryTrace is disposed. The MessageEnvelope is used to look for parent trace metadata to connect traces from publishers to subscribers.
public ITelemetryTrace Trace(string traceName, MessageEnvelope envelope)
Parameters
traceName
stringenvelope
MessageEnvelope