Skip to content

opentelemetry-api, opentelemetry-sdk: add to compat ABC method signatures - #5931

Open
herin049 wants to merge 2 commits into
open-telemetry:mainfrom
herin049:misc/update-compat-signatures
Open

herin049 wants to merge 2 commits into
open-telemetry:mainfrom
herin049:misc/update-compat-signatures

Conversation

@herin049

Copy link
Copy Markdown
Contributor

Description

Follow-up to #5886. Tracer, Meter, Logger and their providers now derive from SignatureCompatABC, which wraps overrides that don't accept **kwargs. That wrapper adds a small per-call cost.

This PR adds **_kwargs: Never to:

  • the public methods of these ABCs. Type checkers will now flag third-party overrides that don't accept **kwargs. This is intentional: it prompts implementors to add **_kwargs, which makes them forward compatible and avoids the wrapper.
  • every implementation in the API (NoOp*, Proxy*) and the SDK, so none of them are wrapped anymore. This resolves the TODO(#5877) in _compat.py.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • I am a human and not a bot
  • I have run tox -e precommit
  • I have run tox -e typecheck
  • I have run the relevant tests and linting tox environments
  • This requires the following PR in contrib:

@herin049
herin049 requested a review from a team as a code owner November 13, 2026 05:05
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Waiting on maintainers · refreshed 2026-11-15 07:18 UTC

Merge when ready.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Approved PRs

Development

Successfully merging this pull request may close these issues.

2 participants