diff --git a/docs/plugins/firebase.md b/docs/plugins/firebase.md index e9a2d541c..50f354eed 100644 --- a/docs/plugins/firebase.md +++ b/docs/plugins/firebase.md @@ -29,6 +29,8 @@ npm i --save @genkit-ai/firebase ## Configuration +### Project ID + To use this plugin, specify it when you call `configureGenkit()`: @@ -69,6 +71,28 @@ Application Default Credentials. To specify your credentials: 1. Set the environment variable `GOOGLE_APPLICATION_CREDENTIALS` to the file path of the JSON file that contains your service account key. +### Telemetry + +The plugin has a direct dependency on the [Google Cloud plugin](google-cloud.md) and thus has provisions to enable telemetry export to Google's Cloud operations suite. To enable telemetry export, set the `enableTracingAndMetrics` to `true` and add a telemetry section to the Genkit configuration: + + + +```js +import {configureGenkit} from "@genkit-ai/core"; +import {firebase} from "@genkit-ai/firebase"; + +configureGenkit({ + plugins: [firebase()], + enableTracingAndMetrics: true, + telemetry: { + instrumentation: 'firebase', + logger: 'firebase', + }, +}); +``` + +Refer the the [Google Cloud plugin](google-cloud.md) documentation for all configuration options and the necessary APIs that need to be enabled on the project. + ## Usage This plugin provides several integrations with Firebase services, which you can