addDatadogExporter
fun OpenTelemetryConfig.addDatadogExporter(datadogApiKey: String? = null, datadogSite: String? = null, timeout: Duration? = null, traceAttributes: Map<String, String>? = null)(source)
Configure an OpenTelemetry span exporter that sends data to Datadog via direct OTLP intake.
Parameters
datadogApiKey
Datadog API key. If not set, is retrieved from DD_API_KEY environment variable.
datadogSite
Datadog site (e.g. datadoghq.com, datadoghq.eu). If not set, is retrieved from DD_SITE environment variable. Defaults to datadoghq.com.
timeout
OpenTelemetry SpanExporter timeout. See io.opentelemetry.exporter.otlp.http.trace.OtlpHttpSpanExporterBuilder.setTimeout.
traceAttributes
resource-level attributes to add to all exported spans. Useful for tagging traces with application-specific metadata (e.g. "env", "tenant_id", "prompt_name").