Repository navigation
Python: chore(observability): remove OTEL_METRICS, an unused local sentinel - #10239
Open
Hyacinth-of-Security (lxcxjxhx) wants to merge 2 commits into
Open
Hyacinth-of-Security (lxcxjxhx) wants to merge 2 commits into
Hyacinth-of-Security (lxcxjxhx) wants to merge 2 commits into
Conversation
Hyacinth-of-Security (lxcxjxhx)
deployed
to
github-app-auth
November 10, 2026 16:43 — with
GitHub Actions
Active
Hyacinth-of-Security (lxcxjxhx)
deployed
to
github-app-auth
November 10, 2026 16:43 — with
GitHub Actions
Active
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the removal of the unused OTEL_METRICS constant.
No open issues 🎉
What changed in this PR
Removes the unused OTEL_METRICS sentinel from the Python core observability module as a small dead-code cleanup.
Changes:
- Deletes the unreferenced constant; leaves telemetry logic unchanged.
| File | Description |
|---|---|
python/packages/core/agent_framework/observability.py |
Removes the unused OTEL_METRICS definition. |
Review effort: Balanced
Hyacinth-of-Security (lxcxjxhx)
deployed
to
github-app-auth
November 10, 2026 17:30 — with
GitHub Actions
Active
This branch was successfully deployed
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.
What
One hit — the definition. It is not re-exported, so it is not part of the module's surface either.
Why it looks live but is not
The name and the value both read like OpenTelemetry, and the surrounding file is full of attribute names
that are live:
OTEL_EXPORTER_OTLP_HEADERS(lines 588/599/610),USAGE_DETAIL_TO_OTEL_ATTR(382).Those are either environment variables read from the SDK or a mapping this module consumes.
OTEL_METRICSis neither —"__otel_metrics__"is not an OTel key, it is a local sentinel string, andnothing in the package compares against it. The neighbour below it,
TOKEN_USAGE_BUCKET_BOUNDARIES,is referenced; this one is not.
Change
One line removed. No behaviour change, and no public surface changes since the name is not in
__all__.Verification
I did not run the test suite locally — the change is a single-line removal of an unreferenced name, and
running this repository's suite needs the full workspace install. CI will cover it.
Happy to close this if
OTEL_METRICSis a placeholder for a metrics path you plan to wire up — in thatcase a
# reserved for …comment would stop the next reader from spending time on the same question.