Class OpenSearchClientActivitySource
Holds the OpenSearch.Net.Diagnostics.OpenSearchClientActivitySource.ActivitySource used to emit OpenTelemetry spans for requests to OpenSearch, along with helpers to keep instrumentation cheap when nobody is listening.
Inherited Members
Namespace: OpenSearch.Net.Diagnostics
Assembly: OpenSearch.Net.dll
Syntax
public static class OpenSearchClientActivitySource
Remarks
This is separate from the legacy DiagnosticSources / DiagnosticListener mechanism, which is retained for backwards compatibility. OpenTelemetry SDKs only observe OpenSearch.Net.Diagnostics.OpenSearchClientActivitySource.ActivitySource, so a consumer only needs to add this source name to start collecting traces:
AddSource(OpenSearchClientActivitySource.ActivitySourceName)
Fields
| Edit this page View SourceActivitySourceName
The name of the OpenSearch.Net.Diagnostics.OpenSearchClientActivitySource.ActivitySource emitting spans for requests to OpenSearch. Add this name to an OpenTelemetry tracer provider to collect spans.
Declaration
public const string ActivitySourceName = "OpenSearch.Net.RequestPipeline"
Field Value
| Type | Description |
|---|---|
| string |
Properties
| Edit this page View SourceHasListeners
Whether the OpenSearch.Net.Diagnostics.OpenSearchClientActivitySource.ActivitySource currently has any listeners. When false, callers
should avoid the cost of starting an Activity and computing its tags.
Declaration
public static bool HasListeners { get; }
Property Value
| Type | Description |
|---|---|
| bool |