Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: Firebase
description: "Adds instrumentation for Firebase. (default)"
supported:
- javascript.node
- javascript.gcp-functions
- javascript.astro
- javascript.bun
---

_Import name: `Sentry.firebaseIntegration`_

This integration is enabled by default. If you want to disable it, you can [modify your default integrations](./../#modifying-default-integrations).

Adds instrumentation for [Firestore](https://firebase.google.com/docs/firestore) and [Cloud Functions for Firebase](https://firebase.google.com/docs/functions).

```JavaScript
Sentry.init({
integrations: [Sentry.firebaseIntegration()],
});
```

## Supported Versions

- `firebase-functions`: `>=6.0.0 <7`
- `@firebase/firestore`: `>=3.0.0 <5`
11 changes: 8 additions & 3 deletions docs/platforms/javascript/guides/gcp-functions/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const Sentry = require("@sentry/google-cloud-serverless");

Sentry.init({
dsn: "___PUBLIC_DSN___",

// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/gcp-functions/configuration/options/#sendDefaultPii
sendDefaultPii: true,
Expand All @@ -53,6 +53,11 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ performance
// ___PRODUCT_OPTION_START___ logs

// Enable logs to be sent to Sentry
enableLogs: true,
// ___PRODUCT_OPTION_END___ logs
});

exports.helloHttp = Sentry.wrapHttpFunction((req, res) => {
Expand Down Expand Up @@ -94,9 +99,9 @@ exports.helloEvents = Sentry.wrapCloudEventFunction(
);
```

<Alert level="warning" title="Note">
<Alert level="info" title="Note">

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

</Alert>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,6 @@ Depending on whether an integration enhances the functionality of a particular r
| [`openAIIntegration`](./openai) | ✓ | | ✓ | |
| [`anthropicAIIntegration`](./anthropic) | ✓ | ✓ | ✓ | |
| [`googleGenAIIntegration`](./google-genai) | ✓ | ✓ | ✓ | |
| [`firebaseIntegration`](./firebase) | ✓ | | ✓ | |
| [`zodErrorsIntegration`](./zodErrors) | | | | ✓ |
| [`pinoIntegration`](./pino) | | ✓ | | |
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
| [`openAIIntegration`](./openai) | ✓ | | ✓ | |
| [`anthropicAIIntegration`](./anthropic) | ✓ | ✓ | ✓ | |
| [`googleGenAIIntegration`](./google-genai) | ✓ | ✓ | ✓ | |
| [`firebaseIntegration`](./firebase) | ✓ | | ✓ | |
| [`captureConsoleIntegration`](./captureconsole) | | | | ✓ |
| [`dataloaderIntegration`](./dataloader) | | | ✓ | |
| [`extraErrorDataIntegration`](./extraerrordata) | | | | ✓ |
Expand All @@ -41,4 +42,4 @@
| [`supabaseIntegration`](./supabase) | | ✓ | ✓ | |
| [`trpcMiddleware`](./trpc) | | ✓ | ✓ | ✓ |
| [`zodErrorsIntegration`](./zodErrors) | | | | ✓ |
| [`pinoIntegration`](./pino) | | ✓ | | |
| [`pinoIntegration`](./pino) | | ✓ | | |
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
| [`openAIIntegration`](./openai) | ✓ | | ✓ | |
| [`anthropicAIIntegration`](./anthropic) | ✓ | ✓ | ✓ | |
| [`googleGenAIIntegration`](./google-genai) | ✓ | ✓ | ✓ | |
| [`firebaseIntegration`](./firebase) | ✓ | | ✓ | |
| [`amqplibIntegration`](./amqplib) | | | ✓ | |
| [`anrIntegration`](./anr) | | ✓ | | |
| [`captureConsoleIntegration`](./captureconsole) | | | | ✓ |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@
| [`openAIIntegration`](./openai) | ✓ | | ✓ | |
| [`anthropicAIIntegration`](./anthropic) | ✓ | ✓ | ✓ | |
| [`googleGenAIIntegration`](./google-genai) | ✓ | ✓ | ✓ | |
| [`firebaseIntegration`](./firebase) | ✓ | | ✓ | |
| [`zodErrorsIntegration`](./zodErrors) | | | | ✓ |
| [`pinoIntegration`](./pino) | | ✓ | | |
Loading