Files
opencloud/docs/ocis/development/tracing.md
Jörn Friedrich Dreyer a46fd132bd use OC_ env prefix
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-13 16:11:11 +01:00

1.8 KiB

title, date, weight, geekdocRepo, geekdocEditPath, geekdocFilePath
title date weight geekdocRepo geekdocEditPath geekdocFilePath
Tracing 2020-05-13T12:09:00+01:00 55 https://github.com/owncloud/ocis edit/master/docs/ocis/development tracing.md

{{< toc >}}

By default, we use Jaeger for request tracing within oCIS. You can follow these steps to get started:

  1. Start Jaeger by using the all-in-one docker image:
    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.17
    
  2. Every single oCIS service has its own environment variables for enabling and configuring tracing.
    1. You can enable and configure tracing on each service individually. For example, enable tracing in Reva when starting the oCIS single binary like this:
      REVA_TRACING_ENABLED=true \
      REVA_TRACING_ENDPOINT=localhost:6831 \
      REVA_TRACING_COLLECTOR=http://localhost:14268/api/traces \
      ./bin/ocis server
      
    2. Enabling and configuring tracing on oCIS itself will forward the configuration to all services:
      OC_TRACING_ENABLED=true \
      OC_TRACING_ENDPOINT=localhost:6831 \
      OC_TRACING_COLLECTOR=http://localhost:14268/api/traces \
      ./bin/ocis server
      
      If you want to set individual tracing configuration for each service, make sure to set OC_TRACING_ENABLED=false.
  3. Make the actual request that you want to trace.
  4. Open up the Jaeger UI to analyze request traces.

For more information on Jaeger, please refer to their Documentation.