Conversation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
There was a problem hiding this comment.
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.
sl0thentr0py
left a comment
There was a problem hiding this comment.
just one comment, feel free to ignore
|
maybe add test cases for having a custom orgID supplied along with a DSN to ensure custom one gets priority |
| 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") | ||
| } |
There was a problem hiding this comment.
Can we add another test for self-hosted DSN?
An example would be: https://example@sentry.example.com/1337
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Yep. But since it's self-hosted, the default OrgId will be 0 though. It should be considered as non-empty value.
Description
add
StrictTraceContinuationoption 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:
For more details: custom changelog entries
Reminders
feat:,fix:,ref:,meta:)Changelog Entry