Class TelemetryConfig
Configuration for JD.AI telemetry (tracing and metrics).
Bind from appsettings.json under the Gateway:Telemetry key.
The OTEL_SERVICE_NAME and OTEL_EXPORTER_OTLP_ENDPOINT environment
variables are also honored (see individual property docs).
public sealed class TelemetryConfig
- Inheritance
-
TelemetryConfig
- Inherited Members
Properties
Enabled
Whether telemetry is enabled. Defaults to true.
Set to false to disable all OTel instrumentation.
public bool Enabled { get; set; }
Property Value
Endpoint
Exporter endpoint URI.
For OTLP/gRPC: http://localhost:4317.
For OTLP/HTTP: http://localhost:4318.
For Zipkin: http://localhost:9411/api/v2/spans.
Also populated automatically from OTEL_EXPORTER_OTLP_ENDPOINT.
public string? Endpoint { get; set; }
Property Value
Exporter
Exporter type. Supported values:
"console"(default) — writes to stdout"otlp"— OTLP exporter (Grafana, Jaeger via OTLP receiver, etc.); see OtlpProtocol and Endpoint"zipkin"— Zipkin HTTP exporter (traces only; metrics fall back to console)
Setting OTEL_EXPORTER_OTLP_ENDPOINT automatically activates "otlp".
public string Exporter { get; set; }
Property Value
OtlpProtocol
OTLP transport protocol. Only used when Exporter is "otlp".
"grpc"(default) — gRPC transport, default port 4317"http"— HTTP/protobuf transport, default port 4318
public string OtlpProtocol { get; set; }
Property Value
ServiceName
Logical service name reported in traces and metrics.
Used when OTEL_SERVICE_NAME is not set; if the OTEL_SERVICE_NAME
environment variable is set, it takes precedence over this value.
Defaults to "jdai".
public string ServiceName { get; set; }