Skip to content

Don't record exception span events by default in typed span methods - #5821

Draft
lmolkova wants to merge 1 commit into
lmolkova/typed-span-contextfrom
lmolkova/typed-span-record-exception
Draft

lmolkova wants to merge 1 commit into
lmolkova/typed-span-contextfrom
lmolkova/typed-span-record-exception

Conversation

@lmolkova

@lmolkova lmolkova commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Stacked on #5820.

Part of #4561 (span event API deprecation, OTEP 4430).

In the SDK, _start_typed_span / _start_as_current_typed_span now default record_exception to False. An exception escaping the block still sets the span status to ERROR by default (set_status_on_exception stays True). Callers can opt back in with record_exception=True.

Since these methods are experimental, changing the default now is allowed, and it means instrumentations moving to span types won't keep emitting exception span events by default. start_span / start_as_current_span are unchanged.

For tracers without span type support, the call is delegated to that tracer's own methods, so their defaults apply when the flag isn't set.

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Waiting on the author · refreshed 2026-10-26 20:58 UTC

Move out of draft to request review.

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.

@lmolkova
lmolkova force-pushed the lmolkova/typed-span-record-exception branch from 1ef3e8d to e89504d Compare October 23, 2026 23:37
@lmolkova
lmolkova added this pull request to stack #5822 October 24, 2026 01:05

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

None yet

Development

Successfully merging this pull request may close these issues.

1 participant