diff --git a/src/platform-includes/configuration/http-client/javascript.mdx b/src/platform-includes/configuration/http-client/javascript.mdx
new file mode 100644
index 0000000000000..df1741e5a6c10
--- /dev/null
+++ b/src/platform-includes/configuration/http-client/javascript.mdx
@@ -0,0 +1,62 @@
+```javascript {tabTitle: JavaScript}
+import * as Sentry from "@sentry/browser";
+import { HttpClient as HttpClientIntegration } from "@sentry/integrations";
+
+Sentry.init({
+ dsn: "___PUBLIC_DSN___",
+ integrations: [
+ new HttpClientIntegration({
+ // This array can contain tuples of `[begin, end]` (both inclusive),
+ // single status codes, or a combination of both.
+ // default: [[500, 599]]
+ failedRequestStatusCodes: [[500, 505], 507],
+
+ // This array can contain Regexes, strings, or a combination of both.
+ // default: [/.*/]
+ failedRequestTargets: [
+ "http://example.com/api/test",
+ /(staging\.)?mypage\.com/,
+ ],
+ }),
+ ],
+
+ // This option is required for capturing headers and cookies.
+ sendDefaultPii: true,
+});
+```
+
+```javascript {tabTitle: CDN}
+
+
+
+
+Sentry.init({
+ dsn: "___PUBLIC_DSN___",
+ integrations: [
+ new HttpClientIntegration({
+ // This array can contain tuples of `[begin, end]` (both inclusive),
+ // single status codes, or a combination of both.
+ // default: [[500, 599]]
+ failedRequestStatusCodes: [[500, 505], 507],
+
+ // This array can contain Regexes, strings, or a combination of both.
+ // default: [/.*/]
+ failedRequestTargets: [
+ "http://example.com/api/test",
+ /(staging\.)?mypage\.com/,
+ ],
+ }),
+ ],
+
+ // This option is required for capturing headers and cookies.
+ sendDefaultPii: true,
+});
+```
diff --git a/src/platforms/javascript/common/configuration/integrations/plugin.mdx b/src/platforms/javascript/common/configuration/integrations/plugin.mdx
index 36d388979e160..673ea771cab39 100644
--- a/src/platforms/javascript/common/configuration/integrations/plugin.mdx
+++ b/src/platforms/javascript/common/configuration/integrations/plugin.mdx
@@ -1,6 +1,6 @@
---
title: Pluggable Integrations
-description: "Learn more about pluggable integrations ExtraErrorData, CaptureConsole, Debug, Offline, RewriteFrames, and ReportingObserver, which are snippets of code that augment functionality for specific applications and/or frameworks."
+description: "Learn more about pluggable integrations ExtraErrorData, CaptureConsole, Debug, HttpClient, Offline, RewriteFrames, and ReportingObserver, which are snippets of code that augment functionality for specific applications and/or frameworks."
redirect_from:
- /platforms/javascript/integrations/plugin/
- /platforms/javascript/pluggable-integrations/
@@ -50,6 +50,26 @@ Available options:
+### HttpClient
+
+_(New in version 7.30.0)_
+
+_Import name: `Sentry.Integrations.HttpClient`_
+
+This integration captures errors on failed requests from Fetch and XHR and attaches request and response information.
+
+By default, error events will not contain header and cookie data. You can change this behavior by setting the `sendDefaultPii` option to `true`.
+
+Available options:
+
+
+
+
+
+Due to the limitations of both the Fetch and XHR API, the cookie and header collection for both requests and responses is based on best effort. Certain headers may be missing in the event created by the integration.
+
+
+
### Offline