Skip to content

Commit 7b28862

Browse files
authored
feat: Add firebase docs integration (#15310)
<!-- 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 adds the documentation for Firebase integrations added in getsentry/sentry-javascript#17952 and getsentry/sentry-javascript#16719 closes #15247 ## 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/)
1 parent b255eb0 commit 7b28862

File tree

6 files changed

+39
-4
lines changed

6 files changed

+39
-4
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: Firebase
3+
description: "Adds instrumentation for Firebase. (default)"
4+
supported:
5+
- javascript.node
6+
- javascript.gcp-functions
7+
- javascript.astro
8+
- javascript.bun
9+
---
10+
11+
_Import name: `Sentry.firebaseIntegration`_
12+
13+
This integration is enabled by default. If you want to disable it, you can [modify your default integrations](./../#modifying-default-integrations).
14+
15+
Adds instrumentation for [Firestore](https://firebase.google.com/docs/firestore) and [Cloud Functions for Firebase](https://firebase.google.com/docs/functions).
16+
17+
```JavaScript
18+
Sentry.init({
19+
integrations: [Sentry.firebaseIntegration()],
20+
});
21+
```
22+
23+
## Supported Versions
24+
25+
- `firebase-functions`: `>=6.0.0 <7`
26+
- `@firebase/firestore`: `>=3.0.0 <5`

docs/platforms/javascript/guides/gcp-functions/index.mdx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const Sentry = require("@sentry/google-cloud-serverless");
4040

4141
Sentry.init({
4242
dsn: "___PUBLIC_DSN___",
43-
43+
4444
// Adds request headers and IP for users, for more info visit:
4545
// https://docs.sentry.io/platforms/javascript/guides/gcp-functions/configuration/options/#sendDefaultPii
4646
sendDefaultPii: true,
@@ -53,6 +53,11 @@ Sentry.init({
5353
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
5454
tracesSampleRate: 1.0,
5555
// ___PRODUCT_OPTION_END___ performance
56+
// ___PRODUCT_OPTION_START___ logs
57+
58+
// Enable logs to be sent to Sentry
59+
enableLogs: true,
60+
// ___PRODUCT_OPTION_END___ logs
5661
});
5762

5863
exports.helloHttp = Sentry.wrapHttpFunction((req, res) => {
@@ -94,9 +99,9 @@ exports.helloEvents = Sentry.wrapCloudEventFunction(
9499
);
95100
```
96101

97-
<Alert level="warning" title="Note">
102+
<Alert level="info" title="Note">
98103

99-
Sentry JavaScript Serverless SDK does not support Cloud Functions for Firebase at the moment.
104+
If you are using Firestore or Cloud Functions for Firebase, you need to enable the [Firebase integration](/platforms/javascript/guides/node/configuration/integrations/firebase/).
100105

101106
</Alert>
102107

platform-includes/configuration/integrations/javascript.astro.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,6 @@ Depending on whether an integration enhances the functionality of a particular r
8585
| [`anthropicAIIntegration`](./anthropic) |||| |
8686
| [`googleGenAIIntegration`](./google-genai) |||| |
8787
| [`langChainIntegration`](./langchain) |||| |
88+
| [`firebaseIntegration`](./firebase) || || |
8889
| [`zodErrorsIntegration`](./zodErrors) | | | ||
8990
| [`pinoIntegration`](./pino) | || | |

platform-includes/configuration/integrations/javascript.bun.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
| [`anthropicAIIntegration`](./anthropic) |||| |
3535
| [`googleGenAIIntegration`](./google-genai) |||| |
3636
| [`langChainIntegration`](./langchain) |||| |
37+
| [`firebaseIntegration`](./firebase) || || |
3738
| [`captureConsoleIntegration`](./captureconsole) | | | ||
3839
| [`dataloaderIntegration`](./dataloader) | | || |
3940
| [`extraErrorDataIntegration`](./extraerrordata) | | | ||
@@ -42,4 +43,4 @@
4243
| [`supabaseIntegration`](./supabase) | ||| |
4344
| [`trpcMiddleware`](./trpc) | ||||
4445
| [`zodErrorsIntegration`](./zodErrors) | | | ||
45-
| [`pinoIntegration`](./pino) | || | |
46+
| [`pinoIntegration`](./pino) | || | |

platform-includes/configuration/integrations/javascript.gcp-functions.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
| [`anthropicAIIntegration`](./anthropic) |||| |
2323
| [`googleGenAIIntegration`](./google-genai) |||| |
2424
| [`langChainIntegration`](./langchain) |||| |
25+
| [`firebaseIntegration`](./firebase) || || |
2526
| [`amqplibIntegration`](./amqplib) | | || |
2627
| [`anrIntegration`](./anr) | || | |
2728
| [`captureConsoleIntegration`](./captureconsole) | | | ||

platform-includes/configuration/integrations/javascript.node.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,6 @@
4646
| [`anthropicAIIntegration`](./anthropic) |||| |
4747
| [`googleGenAIIntegration`](./google-genai) |||| |
4848
| [`langChainIntegration`](./langchain) |||| |
49+
| [`firebaseIntegration`](./firebase) || || |
4950
| [`zodErrorsIntegration`](./zodErrors) | | | ||
5051
| [`pinoIntegration`](./pino) | || | |

0 commit comments

Comments
 (0)