Tracing With OpenTelemetry Collector

Using OpenTelemetry Collector with Jaeger

The Jaeger Docker image includes OpenTelemetry Collector. So, you need not run OpenTelemetry Collector separately.

docker run --name jaeger -p 13133:13133 -p 16686:16686 -p 4317:55680 -d --restart=unless-stopped jaegertracing/opentelemetry-all-in-one

For example:

FLOGO_OTEL_TRACE=true FLOGO_OTEL_OTLP_ENDPOINT="localhost:4317" FLOGO_OTEL_TRACE_ATTRIBUTES="deployment=local,product=flogo" ./TimerOTel-darwin_amd64

Using OpenTelemetry Collector with Zipkin

    Procedure
  1. Start Zipkin as follows:

    docker run -it --rm -p 9411:9411 -d --name zipkin openzipkin/zipkin

  2. Update the OpenTelemetry Collector configuration file for Zipkin, otel-zipkin-collector-config.yaml, as follows:
  3. receivers:
    otlp:
    protocols:
    http:

    exporters:
    zipkin:
    # Change IP
    endpoint: "http://xxx.xxx.x.x:xxxx/api/v2/spans"
    format: proto

    processors:
    batch:

    service:
    pipelines:
    traces:
    receivers: [otlp]
    processors: [batch]
    exporters: [zipkin]

  4. Start OpenTelemetry Collector with Zipkin Exporter as follows:

    docker run -d --rm -p 4318:4318 -v "${PWD}/otel-zipkin-collector-config.yaml":/otel-collector-config.yaml --name otelcol otel/opentelemetry-collector:0.35.0 --config otel-collector-config.yaml

For example:

FLOGO_OTEL_TRACE=true FLOGO_OTEL_OTLP_ENDPOINT="https://localhost:4318" FLOGO_OTEL_TRACE_ATTRIBUTES="deployment=local,product=flogo" ./TimerOTel-darwin_amd64

Using OpenTelemetry Collector with Zipkin (with TLS)

    Procedure
  1. Update server-cert-gen.sh as follows:

    openssl req -newkey rsa:2048 \
    -new -nodes -x509 \
    -days 3650 \
    -out cert.pem \
    -keyout key.pem \
    -extensions san \
    -config <(echo '[req]'; echo 'distinguished_name=req';
    echo '[san]'; echo 'subjectAltName=DNS:localhost,DNS:127.0.0.1') \
    -subj "/C=US/ST=California/L=Sunnyvale/O=TIBCO/OU=Flogo/CN=localhost"

  2. Start Zipkin.

    docker run -it --rm -p 9411:9411 -d --name zipkin openzipkin/zipkin

  3. Update the OpenTelemetry Collector configuration file for Zipkin, otel-zipkin-collector-config.yaml, as follows:

    receivers:
    otlp:
    protocols:
    grpc:
    tls_settings:
    cert_file: /var/certs/cert.pem
    key_file: /var/certs/key.pem

    exporters:
    zipkin:
    endpoint: "http://xxx.xxx.x.x:xxxx/api/v2/spans"
    format: proto

    processors:
    batch:

    service:
    pipelines:
    traces:
    receivers: [otlp]
    processors: [batch]
    exporters: [zipkin]

  4. Create a certs directory under the current directory and copy cert.pem and key.pem in the certs directory.
  5. Start OpenTelemetry Collector with Zipkin Exporter as follows: 

    docker run -d --rm -p 4317:4317 -v "${PWD}/otel-zipkin-collector-config.yaml":/otel-collector-config.yaml -v "${PWD}/certs":/var/certs --name otelcol otel/opentelemetry-collector:0.35.0 --config otel-collector-config.yaml

For example:

FLOGO_OTEL_TRACE=true FLOGO_OTEL_OTLP_ENDPOINT="localhost:4317" 
FLOGO_OTEL_TLS_SERVER_CERT="file:///Users/dev/Installations/OpenTelemetry/zipkin/certs/cert.pem"
FLOGO_OTEL_TRACE_ATTRIBUTES="deployment=local,product=flogo" ./TimerOTel-darwin_amd64