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
Collaborator

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.

#skip-changelog

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

@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 2 times, most recently 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.

Stale Bugbot comment from a previous run.

Comment thread scope.go Outdated
@giortzisg
giortzisg removed this pull request from stack #1452 October 12, 2026 14:07
@giortzisg
giortzisg added this pull request to stack #1456 October 12, 2026 14:11
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from f81901f to a228401 Compare October 12, 2026 15:45
@giortzisg giortzisg changed the title feat: add trace methods to public API feat!: add trace methods to public API Oct 13, 2026
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from a228401 to a431f14 Compare October 13, 2026 15:22
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from a431f14 to eda7ef7 Compare October 15, 2026 17:43

@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 eda7ef7. Configure here.

Comment thread scope.go Outdated
@giortzisg
giortzisg force-pushed the scopes/integration-primitives branch from eda7ef7 to b722895 Compare October 15, 2026 18:03
Resolve log, metric, and propagation data from context-backed clients and scopes, and expose context-based trace header helpers while retaining Hub compatibility.

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 isolate logger and meter trace fallback, and WithScopeOverride is removed in favor of a context carrying the scope.

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 b722895 to b0f25af Compare October 16, 2026 10:58
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