Here’s a step-by-step guide to set up Jaeger for export Permify traces.

Step 1: Install Jaeger in Your Environment

You can either run Jaeger via Docker or install it locally on your machine. Here’s how you can do it with Docker:

docker run -d --name jaeger \
  -e COLLECTOR_ZIPKIN_HTTP_PORT=9411 \
  -p 5775:5775/udp \
  -p 6831:6831/udp \
  -p 6832:6832/udp \
  -p 5778:5778 \
  -p 16686:16686 \
  -p 14268:14268 \
  -p 14250:14250 \
  -p 9411:9411 \
  jaegertracing/all-in-one:1.32

This command runs Jaeger’s all-in-one image with all the services (agent, collector, query service, and UI) on default ports. You can access the Jaeger UI at http://localhost:16686.

Step 2: Configure Permify for Jaeger Tracing

In your configuration file, you will set up Jaeger as the exporter and provide the endpoint for exporting the traces.

Here’s an example configuration:

tracer:
  exporter: jaeger
  endpoint: http://localhost:14268/api/traces
  enabled: true
  insecure: true

Explanation:

  • exporter: jaeger: Specifies that Jaeger will be used as the exporter.
  • endpoint: http://localhost:14268/api/traces: This is the default Jaeger collector endpoint.
  • enabled: true: Turns on the tracing feature.
  • insecure: true: Enables HTTP instead of HTTPS for exporting traces.

Refer to the Configuration section for more details on how to use the configuration file. You can also use environment variables (ENVs) for this.

Step 3: Start Permify with Jaeger Configuration

Make sure your configuration file is loaded when starting Permify, and ensure the Jaeger instance is running.

Permify will now start sending tracing data to the configured Jaeger instance.

Step 4: View Traces in the Jaeger UI

Once you’ve set everything up and your application starts sending requests, you can access Jaeger’s UI at http://localhost:16686 and observe the traces related to your authorization system.

Optional: Use Secure Connection

If you want to use HTTPS for secure communication with Jaeger, you need to set up the insecure option to false and provide the appropriate endpoint:

tracer:
  exporter: jaeger
  endpoint: https://your-jaeger-endpoint
  enabled: true
  insecure: false

This sets up Jaeger with the correct security protocols. See more configurations on Configuration section