feat(filters): add OpenTelemetry routing spans - #729
Open
nerdalert wants to merge 1 commit into
Open
Conversation
Add feature-gated routing.select spans for successful intelligent_route decisions while leaving request lifecycle, propagation, sampling, and export ownership in Praxis core. Keep the default build unchanged and avoid OpenTelemetry SDK dependencies in the AI filters. Record only validated, bounded routing attributes and document the ownership and privacy boundaries. Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds feature-gated OpenTelemetry instrumentation for successful intelligent_route decisions.
When enabled, the filter emits a bounded routing.select child span after the route has been successfully applied. It records privacy-safe routing metadata such as provider, cluster, site, overlay revision, rank, selection tier, selection group, and picker policy.
This PR intentionally does not add an OpenTelemetry SDK, exporter, sampler, propagator, or request-lifecycle root span to AI. That support is being added separately to Praxis core by @Ladas. AI only emits structured tracing spans, so this change remains independently mergeable and does not depend on the core work to compile or operate safely.
The span is emitted only after fallible provider-context mutation succeeds, preventing telemetry from claiming a successful selection when route application fails. Recorded attributes are bounded and exclude credentials, prompts, bodies, authorization headers, cookies, session keys, and request IDs.
Related issue
Closes #
Validation
Validation completed:
Checklist
Breaking changes
None. The feature is disabled by default. Existing configurations, default builds, routing behavior, and deployments remain unchanged. Enabling the feature before Praxis core export support is available is also safe: AI emits ordinary structured tracing spans, but no OpenTelemetry backend export is performed unless core provides and configures that capability.