You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 14a4a63
Browse filesBrowse the repository at this point in the historyBrowse files
feat!: trace Litestar through its own OpenTelemetryPlugin (#279)
LitestarOpenTelemetryInstrument registers litestar.plugins.opentelemetry's
OpenTelemetryPlugin instead of hand-wrapping OpenTelemetryMiddleware in a cached
ASGI middleware. A small route middleware renames the server span to the route
template, which the plugin cannot see because it runs before routing.
Breaking: the litestar-otl extra needs litestar>=2.22; opentelemetry_excluded_urls
are searched in the request path rather than the full URL; unmatched paths now
produce a method-only span; OTEL_PYTHON_LITESTAR_EXCLUDED_URLS is honored.
Copy file name to clipboardExpand all lines: docs/introduction/configuration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,7 +116,7 @@ Additional parameters:
116
116
-`opentelemetry_log_traces` - traces will be logged to stdout.
117
117
-`opentelemetry_sampler` - an `opentelemetry.sdk.trace.sampling.Sampler` deciding which traces are recorded. Unset, the SDK's own default applies: `parentbased_always_on`, which records every trace that is not the child of a non-recording remote parent, unless `OTEL_TRACES_SAMPLER` / `OTEL_TRACES_SAMPLER_ARG` say otherwise.
118
118
-`opentelemetry_generate_health_check_spans` - generate spans for health check handlers if `True`.
119
-
-`opentelemetry_excluded_urls` - extra URLs excluded from tracing; the metrics path and (unless health-check spans are enabled) the health-check path are excluded automatically.
119
+
-`opentelemetry_excluded_urls` - extra regexes for URLs excluded from tracing; the metrics path and (unless health-check spans are enabled) the health-check path are excluded automatically. Litestar searches them in the request path and also honors `OTEL_PYTHON_LITESTAR_EXCLUDED_URLS`; FastAPI searches them in the full URL.
120
120
-`opentelemetry_metrics_endpoint` - will be passed to `OTLPMetricExporter` as endpoint, and turns on the metrics signal. Its own field rather than a flag on `opentelemetry_endpoint`, so upgrading never starts exporting metrics you did not ask for. Under `opentelemetry_exporter_protocol="http"` this is a full URL (e.g. `http://collector:4318/v1/metrics`); `opentelemetry_exporter_protocol` and `opentelemetry_insecure` are shared with traces.
0 commit comments