supabase-community / sentry-integration-js

MIT License
11 stars 3 forks source link

Sentry.nativeNodeFetchIntegration does accept shouldCreateSpanForRequest #14

Closed FelixGerberding closed 5 months ago

FelixGerberding commented 5 months ago

Bug report

Describe the bug

The readme currently shows shouldCreateSpanForRequest within nativeNodeFetchIntegration. This leads to the follow error:

Type error: Object literal may only specify known properties, and 'shouldCreateSpanForRequest' does not exist in type 'NodeFetchOptions'.

It also does not align with the Sentry Docs mentioning ignoreOutgoingRequests.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Setup a NextJS project (app router)
  2. Create a server.config.ts according to the current readme
  3. run npm run build
  4. See error

Expected behavior

Usage of ignoreOutgoingRequestsinstead of shouldCreateSpanForRequestwithin readme

kamilogorek commented 5 months ago

Thanks for catching that. Fixed in https://github.com/supabase-community/sentry-integration-js/commit/114471f208ec8dafa42511d03e90acdfcfa51ce3

They did not mention it in https://docs.sentry.io/platforms/javascript/migration/v7-to-v8/, https://github.com/getsentry/sentry-javascript/blob/develop/docs/CHANGELOG.md or https://github.com/getsentry/sentry-javascript/blob/develop/docs/changelog/v7.md 😢

It also applies to nodefetch and http only, browser and wintercg still uses shouldCreateSpanForRequest.