Skip to content

fix: Make breadcrumbs option optional in WinterCGFetch integration#10785

Merged
Lms24 merged 1 commit intogetsentry:developfrom
kamilogorek:patch-1
Feb 22, 2024
Merged

fix: Make breadcrumbs option optional in WinterCGFetch integration#10785
Lms24 merged 1 commit intogetsentry:developfrom
kamilogorek:patch-1

Conversation

@kamilogorek
Copy link
Copy Markdown
Contributor

Right now it's not possible to use it as:

new Sentry.Integrations.WinterCGFetch({
  shouldCreateSpanForRequest: (url) => {
    return !url.startsWith(`${process.env.NEXT_PUBLIC_SUPABASE_URL}/rest`);
  }
})

due to breadcrubs not being marked as optional. Instead of changing it to such, reuse already existing Options interface to keep it in sync with the integration itself.

Copy link
Copy Markdown
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Good catch, thx!

The class version of this integration will be gone soon anyway but we can merge this in and backport it to our v7 branch, which is where we should really fix this. Would you mind throwing up another PR for that @kamilogorek?

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