Skip to content

bugsnag: propagate cloud_provider into contextual logging for queued executions#268

Merged
morgan-wowk merged 1 commit into
masterfrom
bugsnag/cloud-provider-context
Jun 13, 2026
Merged

bugsnag: propagate cloud_provider into contextual logging for queued executions#268
morgan-wowk merged 1 commit into
masterfrom
bugsnag/cloud-provider-context

Conversation

@morgan-wowk

@morgan-wowk morgan-wowk commented May 28, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

morgan-wowk commented May 28, 2026

Copy link
Copy Markdown
Collaborator Author

morgan-wowk commented May 28, 2026

Copy link
Copy Markdown
Collaborator Author

CC: @yuechao-qin

This will allow you to filter errors to Nebius or GKE.

@morgan-wowk morgan-wowk requested a review from yuechao-qin May 28, 2026 22:58
@morgan-wowk morgan-wowk force-pushed the bugsnag/cloud-provider-context branch from 3bb4cc1 to faed3ca Compare June 3, 2026 19:22
@morgan-wowk morgan-wowk force-pushed the bugsnag/service-slice branch from abe0fb0 to 4730f88 Compare June 3, 2026 19:22
@morgan-wowk morgan-wowk force-pushed the bugsnag/cloud-provider-context branch 2 times, most recently from a2974f3 to 410f807 Compare June 3, 2026 19:35
Comment thread cloud_pipelines_backend/instrumentation/contextual_logging.py Outdated
Comment thread cloud_pipelines_backend/instrumentation/contextual_logging.py Outdated
Comment thread cloud_pipelines_backend/instrumentation/contextual_logging.py Outdated
Comment thread cloud_pipelines_backend/instrumentation/contextual_logging.py

from .. import backend_types_sql as bts

_CLOUD_PROVIDER_ANNOTATION_KEY = "cloud-pipelines.net/orchestration/cloud_provider"

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.

nebius_launchers.py has this same exact constant. Would it make sense to create a shared config/model/etc file that both of them reference against? Or some way to not duplicate the variable?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

🤖 Good eye, but the duplication is intentional for now. The tech lead asked us not to commit CLOUD_PROVIDER_ANNOTATION_KEY to the shared common_annotations layer yet — there's an open question about whether a launcher-specific annotation is the right long-term standard, or whether a different annotation design would be better. Once there's consensus, we can consolidate. Until then, keeping it private to each module avoids prematurely locking in the API.

@morgan-wowk morgan-wowk force-pushed the bugsnag/service-slice branch from 4730f88 to e6a36dc Compare June 10, 2026 20:52
@morgan-wowk morgan-wowk force-pushed the bugsnag/cloud-provider-context branch from 410f807 to f313191 Compare June 10, 2026 20:52

Copy link
Copy Markdown
Collaborator Author

image.png

Smoke-tested E2E locally.

morgan-wowk commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator Author

Merge activity

  • Jun 13, 12:04 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 13, 12:09 AM UTC: Graphite rebased this pull request as part of a merge.
  • Jun 13, 12:10 AM UTC: @morgan-wowk merged this pull request with Graphite.

@morgan-wowk morgan-wowk changed the base branch from bugsnag/service-slice to graphite-base/268 June 13, 2026 00:07
@morgan-wowk morgan-wowk changed the base branch from graphite-base/268 to master June 13, 2026 00:08
…executions

Adds CLOUD_PROVIDER_ANNOTATION_KEY to common_annotations so the annotation
key has a single definition in the OSS layer.

In the queued-execution processing span, reads the cloud_provider value from
task_spec annotations (already in memory) and adds it to the contextual
logging context when present. The existing _before_notify hook then includes
it automatically in the tangle_context tab on every Bugsnag event raised
during that execution's processing.
@morgan-wowk morgan-wowk force-pushed the bugsnag/cloud-provider-context branch from f313191 to 964652e Compare June 13, 2026 00:09
@morgan-wowk morgan-wowk merged commit decae68 into master Jun 13, 2026
7 checks passed
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.

4 participants