Skip to content

feat: add StrictTraceContinuation option#1210

Merged
giortzisg merged 5 commits intomasterfrom
feat/strict-trace-continuation
Mar 4, 2026
Merged

feat: add StrictTraceContinuation option#1210
giortzisg merged 5 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 support for homogenous arrays by giortzisg in #1203
  • Add support for client reports by giortzisg in #1192
  • 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

Bug Fixes 🐛

  • (serialization) Pre-serialize mutable event fields to prevent race panics by giortzisg in #1214
  • Use HEROKU_BUILD_COMMIT with HEROKU_SLUG_COMMIT as fallback by ericapisani in #1220

Internal Changes 🔧

Ai

  • Add AGENTS.md and testing guidelines by giortzisg in #1216
  • Add dotagents configuration by giortzisg in #1211

Deps

  • Bump getsentry/craft from 2.20.1 to 2.23.1 by dependabot in #1213
  • Bump github.com/gofiber/fiber/v2 from 2.52.11 to 2.52.12 in /fiber by dependabot in #1209

Other

  • Handle independent go module versions for integrations by giortzisg in #1217

🤖 This preview updates automatically when you update the PR.

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://[email protected]/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://[email protected]/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://[email protected]/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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we consider 0 as empty, since we can't really distinguish, self hosted orgs should just use the OrgID clientoption. The tracing tests cover that case.

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 2 potential issues.

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

@giortzisg giortzisg merged commit 1b52229 into master Mar 4, 2026
18 checks passed
@giortzisg giortzisg deleted the feat/strict-trace-continuation branch March 4, 2026 11:55
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