System.Diagnostics
Namespace with 20 public types
Classes
Activity
Represents an operation with context to be used for logging.
ActivityListener
Allows listening to the start and stop activity events and gives the opportunity to decide creating an activity for sampling scenarios.
ActivitySource
Provides APIs to create and start objects and to register objects to listen to the events.
ActivityTagsCollection
ActivityTagsCollection is a collection class used to store tracing tags.
This collection will be used with classes like and .
This collection behaves as follows:
- The collection items will be ordered according to how they are added.
- Don't allow duplication of items with the same key.
- When using the indexer to store an item in the collection:
- If the item has a key that previously existed in the collection and the value is , the collection item matching the key will be removed from the collection.
- If the item has a key that previously existed in the collection and the value is not , the new item value will replace the old value stored in the collection.
- Otherwise, the item will be added to the collection.
- Add method will add a new item to the collection if an item doesn't already exist with the same key. Otherwise, it will throw an exception.
DiagnosticListener
Provides an implementation of the abstract class that represents a named place to which a source sends its information (events).
Structures
ActivityContext
A representation that conforms to the W3C TraceContext specification. It contains two identifiers: a TraceId and a SpanId, along with a set of common TraceFlags and system-specific TraceState values.
ActivityCreationOptions`1
Encapsulates all the information that is sent to the activity listener, to make decisions about the creation of the activity instance, as well as its state.
The possible generic type parameters are or .
ActivityEvent
Represents an event containing a name and a timestamp, as well as an optional list of tags.
ActivityLink
Activities may be linked to zero or more activity context instances that are causally related.
Activity links can point to activity contexts inside a single trace or across different traces.
Activity links can be used to represent batched operations where an activity was initiated by multiple initiating activities, each representing a single incoming item being processed in the batch.
ActivitySpanId
Represents a formatted based on a W3C standard.
ActivityTraceId
Represents a whose format is based on a W3C standard.
TagList
Represents a list of tags that can be accessed by index. Provides methods to search, sort, and manipulate lists.
Enumerations
ActivityIdFormat
Specifies the format of the property.
ActivityKind
Describes the relationship between the activity, its parents and its children in a trace.
ActivitySamplingResult
Enumeration values used by to indicate the amount of data to collect for the related . Requesting more data causes a greater performance overhead.
ActivityStatusCode
Define the status code of the Activity which indicate the status of the instrumented operation.
ActivityTraceFlags
Specifies flags defined by the W3C standard that are associated with an activity.
Abstract Classes
DiagnosticSource
An abstract class that allows code to be instrumented for production-time logging of rich data payloads for consumption within the process that was instrumented.
DistributedContextPropagator
An implementation of determines if and how distributed context information is encoded and decoded as it traverses the network.
The encoding can be transported over any network protocol that supports string key-value pairs. For example, when using HTTP, each key-value pair is an HTTP header.
injects values into and extracts values from carriers as string key-value pairs.