Skip to content

feat: add StrictTraceContinuation option#1210

Open
giortzisg wants to merge 4 commits intomasterfrom
feat/strict-trace-continuation
Open

feat: add StrictTraceContinuation option#1210
giortzisg wants to merge 4 commits intomasterfrom
feat/strict-trace-continuation

Conversation

@giortzisg
Copy link
Contributor

@giortzisg giortzisg commented Feb 25, 2026

Description

add StrictTraceContinuation option according to https://develop.sentry.dev/sdk/telemetry/traces/#stricttracecontinuation.

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

Changelog Entry

  • add org id propagation in sentry_baggage
  • add OrgID and StrictTraceContinuation client options.

@giortzisg giortzisg self-assigned this Feb 25, 2026
@linear
Copy link

linear bot commented Feb 25, 2026

@github-actions
Copy link

github-actions bot commented Feb 25, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • add org id propagation in sentry_baggage by giortzisg in #1210
  • add OrgID and StrictTraceContinuation client options. by giortzisg in #1210
  • Add the option to set attributes on the scope by giortzisg in #1208

Internal Changes 🔧

  • (deps) Bump github.com/gofiber/fiber/v2 from 2.52.11 to 2.52.12 in /fiber by dependabot in #1209

🤖 This preview updates automatically when you update the PR.

Copy link

@cursor cursor bot left a comment

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.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Copy link
Member

@sl0thentr0py sl0thentr0py left a comment

Choose a reason for hiding this comment

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

just one comment, feel free to ignore

@sl0thentr0py
Copy link
Member

maybe add test cases for having a custom orgID supplied along with a DSN to ensure custom one gets priority

Comment on lines +903 to +922
func TestClient_ParseOrgID(t *testing.T) {
c, err := NewClient(ClientOptions{
Dsn: "https://example@o1.ingest.us.sentry.io/1337",
})
if err != nil {
t.Fatal(err)
}
assert.Equal(t, uint64(1), c.dsn.GetOrgID(), "Custom org id should override the DSN parsed one")
}

func TestClientOptions_OrgIDShouldOverrideParsed(t *testing.T) {
c, err := NewClient(ClientOptions{
Dsn: "https://example@o1.ingest.us.sentry.io/1337",
OrgID: 2,
})
if err != nil {
t.Fatal(err)
}
assert.Equal(t, uint64(2), c.dsn.GetOrgID(), "Custom org id should override the DSN parsed one")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add another test for self-hosted DSN?

An example would be: https://example@sentry.example.com/1337

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You would need to use the OrgID option anyways, since we can't parse an id from the DSN, so TestClientOptions_OrgIDShouldOverrideParsed should verify both, but I can add a small one just to be sure.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep. But since it's self-hosted, the default OrgId will be 0 though. It should be considered as non-empty value.

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.

add StrictTraceContinuation option

3 participants