Serilog.Sinks.OpenTelemetry.OpenTelemetrySinkOptions
Initialization options for OpenTelemetrySink.
The URL of the OTLP exporter endpoint. This should include full scheme, host, and port information. When the
protocol is HttpProtobuf, this may also include path information, but the standard
OTLP path components /v1/logs and /v1/traces should not be specified, and will be trimmed if
present. Set this value to and specify one of either LogsEndpoint or
TracesEndpoint if only a single signal is desired.
Supplies culture-specific formatting information, or null.
Headers to send with network requests.
A custom HTTP message handler. To suppress tracing of HTTP requests from the sink, set the handler to
a SocketsHttpHandler with nullActivityHeadersPropagator:
options.HttpMessageHandler = new SocketsHttpHandler { ActivityHeadersPropagator = null };
Which fields should be included in the log events generated by the sink. The default is to include TraceId
and SpanId when Current is not null, and message_template.text.
A switch allowing the pass-through minimum level
to be changed at runtime.
Override the URL for the OTLP exporter logs endpoint. This should be a full URL, and if the protocol is
HttpProtobuf this should include path components like /v1/logs. By default,
an endpoint will be computed from Endpoint.
A callback used by the sink before triggering behaviors that may themselves generate log or trace information.
Set this value to OpenTelemetry.SuppressInstrumentationScope.Begin when using this sink in applications
that instrument HTTP or gRPC requests using OpenTelemetry.
The OTLP protocol to use.
A attributes of the resource attached to the logs generated by the sink. The values must be simple primitive
values: integers, doubles, strings, or booleans. Other values will be silently ignored.
The minimum level for events passed through the sink. The default value is to not restrict events based on
level. Ignored when LevelSwitch is specified.
Override the URL for the OTLP exporter traces endpoint. This should be a full URL, and if the protocol is
HttpProtobuf this should include path components like /v1/traces. By default,
an endpoint will be computed from Endpoint.
public OpenTelemetrySinkOptions()