Interface: BuildObservabilityOptions
Properties
Section titled “Properties”enabled?
Section titled “enabled?”
optionalenabled?:boolean
Whether to wire the Mastra OtelBridge. Mirrors
MastraPluginConfig.observability:
undefined(auto): on only whenOTEL_EXPORTER_OTLP_ENDPOINTorOTEL_EXPORTER_OTLP_TRACES_ENDPOINTis set (same signal AppKit’sTelemetryManageruses to register a real tracer). When unset, skip the bridge entirely so Mastra does not emit[OtelBridge] No OTEL span foundwarnings on the noop tracer.true: force on even without an OTLP endpoint.false: force off.
requestContextKeys?
Section titled “requestContextKeys?”
optionalrequestContextKeys?: readonlystring[]
RequestContext keys to extract as span metadata on every Mastra
trace. Defaults to TRACE_REQUEST_CONTEXT_KEYS (user id,
thread id, request id, environment, model override, …).
Supports dot notation for nested values per the Mastra docs.
serviceName?
Section titled “serviceName?”
optionalserviceName?:string
Service name attached to the Mastra Observability config. Used
as the tracer scope name on bridged OTel spans (the service.name
resource attribute is owned by AppKit’s TelemetryManager instead
- it reads
OTEL_SERVICE_NAME/DATABRICKS_APP_NAMEatcreateApptime).
Defaults to project name then "mastra".