You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(node): Add new options to nativeNodeFetchIntegration (#15282)
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->
## DESCRIBE YOUR PR
This is the documentation for
getsentry/sentry-javascript#17996 (it also adds
the missing `spans`).
Now I think I did a little hack, since these options are not available
in `node-core`, but `javascript.node-core` is not a identifier. So I
show a little warning for only `javascript.node` that it is not
available in the `node-core` package. Since all other integrations use
`@sentry/node` anyways, we don't have to show this warning so that is
why I use the `<PlatformSection />` as well.
## IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+
## SLA
- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!
## PRE-MERGE CHECKLIST
*Make sure you've checked the following before merging your changes:*
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
## EXTRA RESOURCES
- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
Copy file name to clipboardExpand all lines: docs/platforms/javascript/common/configuration/integrations/nodefetch.mdx
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,3 +60,21 @@ If set to false, no breadcrumbs will be captured.
60
60
_Type: `(url: string) => boolean`_
61
61
62
62
Allows you to define a method to filter out outgoing requests based on the URL. If the method returns `true`, the request will be ignored.
63
+
64
+
### `spans`
65
+
66
+
_Type: `boolean`_
67
+
68
+
If set to false, no spans will be captured.
69
+
70
+
### `requestHook`
71
+
72
+
_Type: `(span: Span, request: Request) => void`_
73
+
74
+
A callback function that allows you to add custom attributes or modify the span for outgoing fetch requests. The function is called with the span and the native fetch `Request` object.
A callback function that allows you to add custom attributes or modify the span based on the response of outgoing fetch requests. The function is called with the span and the native fetch `Response` object.
0 commit comments