feat: auto-detect and mutually exclude native vs third-party agentic instrumentors#729
Merged
wangzlei merged 3 commits intoaws-observability:mainfrom Apr 23, 2026
Conversation
84ea188 to
1c1a43a
Compare
liustve
reviewed
Apr 22, 2026
liustve
reviewed
Apr 22, 2026
liustve
reviewed
Apr 22, 2026
liustve
reviewed
Apr 22, 2026
1c1a43a to
00ecc61
Compare
…gent_observability_enabled
b819bdc to
036a615
Compare
… agentic instrumentors When AGENT_OBSERVABILITY_ENABLED=true, auto-detect registered third-party instrumentors (e.g. OpenInference) and disable conflicting AWS native ones to prevent double instrumentation. Add AWS_AGENTIC_INSTRUMENTATION_OPT_IN env var to let users override auto-detection and force AWS native instrumentors over third-party ones.
036a615 to
821b24b
Compare
liustve
approved these changes
Apr 23, 2026
vastin
approved these changes
Apr 23, 2026
This was referenced Apr 23, 2026
liustve
added a commit
to aws-observability/aws-application-signals-test-framework
that referenced
this pull request
Apr 23, 2026
- Aligns genai v1 and v2 E2E test Terraform with changes from [aws-otel-python-instrumentation#729](aws-observability/aws-otel-python-instrumentation#729).
liustve
added a commit
that referenced
this pull request
Apr 23, 2026
…cs endpoints (#732) *Description of changes:* - Restore the `OTEL_EXPORTER_OTLP_ENDPOINT` guard that was dropped in #729 - When the base `OTEL_EXPORTER_OTLP_ENDPOINT` is set (e.g. to a local collector), skip defaulting `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` and `OTEL_EXPORTER_OTLP_LOGS_ENDPOINT` to the direct-to-AWS URLs so the OTel SDK honors the base URL
liustve
added a commit
to aws-observability/aws-otel-js-instrumentation
that referenced
this pull request
Apr 27, 2026
…instrumentors (#417) parities: aws-observability/aws-otel-python-instrumentation#729 - Checks existing downloaded packages, if a conflict is found, the ADOT instrumentation skips itself instead of producing duplicate spans. - AWS_AGENTIC_INSTRUMENTATION_OPT_IN=true overrides the detection and forces ADOT instrumentations to enable regardless of third-party presence.
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
AWS_AGENTIC_OBSERVABILITY_OPT_INlogic and related code introduced in 0.17, restore v0.15is_agent_observability_enabled()as the sole legacy toggleAGENT_OBSERVABILITY_ENABLED=true, auto-detect registered third-party agentic instrumentors (e.g. OpenInference) and mutually exclude them with AWS native ones to prevent double instrumentationAWS_AGENTIC_INSTRUMENTATION_OPT_INenv var to let users override auto-detection and force AWS native instrumentorsUse Cases
Case 1: New user, only ADOT installed (no OpenInference)
AGENT_OBSERVABILITY_ENABLED=trueaws_langchain,aws_crewai, etc.) auto-enabledCase 2: Existing user with ADOT + OpenInference
AGENT_OBSERVABILITY_ENABLED=truelangchain,crewaietc. entry points from OpenInferenceaws_langchain,aws_crewai) are disabled automaticallyCase 3: User wants to migrate from OpenInference to AWS native
AGENT_OBSERVABILITY_ENABLED=true+AWS_AGENTIC_INSTRUMENTATION_OPT_IN=trueCase 4: Non-agentic user
AGENT_OBSERVABILITY_ENABLED→ entire agentic logic skipped, no impactCase 5: User with custom OTEL_PYTHON_DISABLED_INSTRUMENTATIONS
Test plan
aws_opentelemetry_distro.pyat 100%