Skip to main content
The OpenFGA SDK Client supports telemetry data collection using OpenTelemetry.

Enabling Telemetry

  1. Install the OpenFGA SDK Client
  2. Setup OpenTelemetry
  3. Install the OpenTelemetry SDK dependencies for your application
  4. Instantiate the OpenTelemetry SDK in your application
Once you have completed these steps, the OpenFGA SDK Client will automatically collect telemetry data using your application’s OpenTelemetry configuration.

Customizing Telemetry

The OpenFGA SDK Client will automatically use a default configuration for telemetry collection. You can provide your own configuration to include additional metrics or to exclude metrics that are not relevant to your application.

Examples

We provide example applications for using telemetry with the OpenFGA SDK Client.

Supported Metrics

The OpenFGA SDK Client can collect the following metrics:

Supported Attributes

The OpenFGA SDK Client can collect the following attributes:

Tracing

OpenFGA supports tracing with OpenTelemetry. If your application uses OpenTelemetry tracing, traces will be propagated to OpenFGA, provided the traces are exported to the same address. This can be useful to help diagnose any suspected performance issues when using OpenFGA. If your application does not already use tracing, OpenTelemetry offers zero-code instrumentation for several languages. For example, a TypeScript application can be configured with tracing by using one of the OpenTelemetry JavaScript Instrumentation Libraries:
Create an initialization file to configure tracing:
Run the application with the appropriate OTEL environment variables:
See the OpenTelemetry documentation for additional information to configure your application for tracing.
Last modified on September 28, 2026