Skip to content

feat: add trace methods to public API - #1394

Open
giortzisg wants to merge 1 commit into
scopes/context-tracingfrom
scopes/integration-primitives
Open

giortzisg wants to merge 1 commit into
scopes/context-tracingfrom
scopes/integration-primitives

Conversation

@giortzisg

@giortzisg giortzisg commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Description

This adds new trace propagation APIs that resolve with context. Also changes logs and metrics to resolve scope through context rather than the old hub API.

Issues

Changelog Entry Instructions

To add a custom changelog entry, uncomment the section above. Supports:

  • Single entry: just write text
  • Multiple entries: use bullet points
  • Nested bullets: indent 4+ spaces

For more details: custom changelog entries

Reminders

@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from 4d788fd to deeab0c Compare August 24, 2026 10:53
@giortzisg
giortzisg marked this pull request as ready for review August 24, 2026 13:24
Comment thread scope.go
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from deeab0c to 7e6baff Compare August 31, 2026 10:50
Comment thread metrics.go Outdated
Comment thread log.go
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from 7e6baff to 51c535e Compare September 1, 2026 09:12

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread log.go Outdated
@giortzisg
giortzisg requested a review from Litarnus September 1, 2026 09:19
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from 51c535e to d7b1f55 Compare September 1, 2026 12:57
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from d7b1f55 to 45876fc Compare September 2, 2026 07:59
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from 45876fc to 71754bd Compare September 4, 2026 13:11
Comment thread tracing.go Outdated
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from 71754bd to 4ec37b3 Compare September 4, 2026 13:26
Comment thread tracing.go Outdated
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from 4ec37b3 to c4e83dd Compare September 7, 2026 11:40
Comment thread tracing.go Outdated
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from c4e83dd to c2a58ea Compare September 7, 2026 11:49

@szokeasaurusrex szokeasaurusrex left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The changes mostly look okay, but it seems this PR contains more changes than are suggested by the PR description. Was there perhaps a problem when rebasing the stack? Or these are all intended to be here?

Edit: Nvm, I re-read the description and suppose everything is in scope 😅

Comment thread log_fallback.go Outdated
Comment thread log_test.go Outdated
Comment thread metrics.go
Comment thread scope.go
Comment thread metrics.go Outdated
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from aeb2126 to 3da3e78 Compare September 17, 2026 08:38
Comment thread dynamic_sampling_context.go
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from 3da3e78 to a5ded29 Compare September 17, 2026 09:09
@giortzisg
giortzisg removed this pull request from stack #1420 September 18, 2026 11:17
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from a5ded29 to 7c1e40f Compare September 18, 2026 11:18
@giortzisg
giortzisg added this pull request to stack #1433 September 18, 2026 11:22

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread hub.go
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch 2 times, most recently from bec2b01 to 6acba04 Compare September 29, 2026 11:11
@giortzisg
giortzisg removed this pull request from stack #1433 September 29, 2026 11:14

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread tracing.go
@giortzisg
giortzisg added this pull request to stack #1437 September 29, 2026 11:18
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from 6acba04 to a5b0d43 Compare September 29, 2026 11:19
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from a5b0d43 to d5ff024 Compare October 8, 2026 12:43
Comment thread tracing.go
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from d5ff024 to 25ed496 Compare October 8, 2026 14:17
Resolve log, metric, and propagation data from context-backed clients and scopes, and expose context-based trace header helpers while retaining Hub compatibility.

Use the request transaction as the scope fallback, preserve external trace precedence and sampling flags, and propagate only matching dynamic sampling context. Freeze spanless scope metadata once on first export and take trace IDs and DSC from the same locked snapshot. Reject frozen custom metadata for another trace and propagate a negative decision for fresh unsampled scope-only traces. Explicit request scopes, including metric overrides, isolate logger and meter trace fallback.

Replace stale Sentry baggage while preserving outgoing third-party members.

Keep malformed baggage errors visible to direct parser callers while continuing valid sentry-trace headers. Preserve head sampling metadata when a late status filter rejects a transaction.
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from 25ed496 to f81901f Compare October 9, 2026 08:36
@giortzisg
giortzisg removed this pull request from stack #1437 October 9, 2026 08:37
@giortzisg
giortzisg added this pull request to stack #1452 October 9, 2026 08:37

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f81901f. Configure here.

Comment thread scope.go
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.

2 participants