8000 Do not mark cancelled subscription spans as errors by cquiroz · Pull Request #896 · gemini-hlsw/clue · GitHub
[go: up one dir, main page]

Skip to content

Do not mark cancelled subscription spans as errors - #896

Merged
cquiroz merged 2 commits into
mainfrom
otel4s-subscribe-cancel-span
Nov 23, 2026
Merged

cquiroz merged 2 commits into
mainfrom
otel4s-subscribe-cancel-span

Conversation

@cquiroz
@cquiroz cquiroz commented Nov 18, 2026
Copy link
Copy Markdown
Collaborator

We see many trace errors in subscriptions when one is cancelled.

With this PR we avoid that. The subscribe span now marks only real failures as errors and keeps the exception message. Queries and mutations are unchanged.

@mergify mergify Bot added the otel4s label Nov 18, 2026
@mergify
mergify Bot commented Nov 18, 2026 •
Copy link
Copy Markdown
Contributor

This pull request is merged.

- Record the exception when the stream fails, so a recovered stream error
  still leaves an exception event.
- Record clue.exitCase = Canceled when cancelled before the stream is pulled.
- Use plain Succeeded / Errored / Canceled values for clue.exitCase.
- Record a stream error only once when the consumer rethrows it.
- Cover stream failures, recovery and normal completion in tests.
@cquiroz
cquiroz requested a review from rpiaggio November 23, 2026 11:58
@rpiaggio rpiaggio left a comment
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cquiroz
cquiroz merged commit 8e9ec1e into main Nov 23, 2026
15 checks passed
@cquiroz
cquiroz deleted the otel4s-subscribe-cancel-span branch November 23, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0