Skip to content

fix(otel): flush telemetry on shutdown with fresh context (DEV-33)#5

Merged
RndmCodeGuy20 merged 1 commit into
stagingfrom
feat/dev-33-otel-shutdown-fresh-ctx
Jun 16, 2026
Merged

fix(otel): flush telemetry on shutdown with fresh context (DEV-33)#5
RndmCodeGuy20 merged 1 commit into
stagingfrom
feat/dev-33-otel-shutdown-fresh-ctx

Conversation

@RndmCodeGuy20

Copy link
Copy Markdown
Owner

Closes DEV-33.

OTel tracer/metrics shutdown reused the already-cancelled serverCtx, so the export flush deadline was expired on every graceful shutdown — buffered spans/metrics dropped.

Fix

  • Mint a fresh 10s context.Background() timeout for each shutdown, mirroring srv.Stop
  • Pass serverCtx directly to init; drop the redundant alias vars

🤖 Generated with Claude Code

- Use a fresh 10s context for tracer and metrics shutdown
- Stop passing the cancelled serverCtx, which aborted the flush
- Pass serverCtx directly to init; drop redundant alias vars
@RndmCodeGuy20 RndmCodeGuy20 merged commit 4c87ebf into staging Jun 16, 2026
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