Skip to content

feat(appkit): add plugin trace header hooks and auto Databricks auth for OTLP trace exporter#210

Open
hubertzub-db wants to merge 1 commit intodatabricks:mainfrom
hubertzub-db:prework-tracing
Open

feat(appkit): add plugin trace header hooks and auto Databricks auth for OTLP trace exporter#210
hubertzub-db wants to merge 1 commit intodatabricks:mainfrom
hubertzub-db:prework-tracing

Conversation

@hubertzub-db
Copy link

@hubertzub-db hubertzub-db commented Mar 24, 2026

Summary

  • Plugin trace header contribution: Plugins can now define a static appendTraceHeaders(config) method on their constructor. These headers are collected during _createApp and forwarded exclusively to the OTLP trace exporter, enabling plugins (e.g. MLflow) to inject experiment IDs or other metadata into trace exports.
  • Automatic Databricks authentication for traces: When DATABRICKS_HOST is set and no explicit authorization header is provided, TelemetryManager auto-resolves credentials via WorkspaceClient and attaches them to the trace exporter. This enables direct trace export to Databricks-hosted OTLP endpoints without manual token configuration.
  • Lazy instrumentation factories: HTTP and Express instrumentations are now created via factory functions instead of being eagerly instantiated at import time, preventing premature module patching side effects.
  • Server telemetry opt-out: Added enableDefaultTelemetry option to ServerConfig, allowing consumers to disable automatic HTTP/Express span creation when not needed.

Signed-off-by: Hubert Zub <hubert.zub@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant