Skip to content

Latest commit

 

History

History

opentelemetry

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

OpenTelemetry usage with OpenFGA's JS SDK

This example demonstrates how you can use OpenTelemetry with OpenFGA's JS SDK.

Prerequisites

If you do not already have an OpenFGA instance running, you can start one using the following command:

docker run -d -p 8080:8080 openfga/openfga

You need to have an OpenTelemetry collector running to receive data. A pre-configured collector is available using Docker:

git clone https://github.com/ewanharris/opentelemetry-collector-dev-setup.git
cd opentelemetry-collector-dev-setup
docker-compose up -d

Configure the example

You need to configure the example for your environment:

cp .env.example .env

Now edit the .env file and set the values as appropriate.

Running the example

Begin by installing the required dependencies:

npm i

Next, run the example:

npm start