Overview
This integration enables you to send traces from your instrumented applications running in Docker. This is achieved by using a dedicated Logz.io OpenTelemetry collector deployed in the same Docker network as your application. This collector configuration can collect traces from:
- OpenTelemetry
- Zipkin
- Jaeger
- OpenCensus
Before you begin, you’ll need:
- An instrumented application running in a Docker network
- An active account with Logz.io
- A name defined for your tracing service
In the same Docker network as your application:
Pull the Docker image for the OpenTelemetry collector
docker pull logzio/otel-collector-traces
This integration only works with an otel-contrib image. The logzio/otel-collector-traces image is based on otel-contrib.
Run the container
When running on a Linux host, use the --network host
flag to publish the collector ports:
docker run \
-e LOGZIO_REGION=<<LOGZIO_ACCOUNT_REGION_CODE>> \
-e LOGZIO_TRACES_TOKEN=<<TRACING-SHIPPING-TOKEN>> \
--network host \
logzio/otel-collector-traces
When running on MacOS or Windows hosts, publish the ports using the -p
flag:
docker run \
-e LOGZIO_REGION=<<LOGZIO_ACCOUNT_REGION_CODE>> \
-e LOGZIO_TRACES_TOKEN=<<TRACING-SHIPPING-TOKEN>> \
-p 55678-55680:55678-55680 \
-p 1777:1777 \
-p 9411:9411 \
-p 9943:9943 \
-p 6831:6831 \
-p 6832:6832 \
-p 14250:14250 \
-p 14268:14268 \
-p 4317:4317 \
-p 4318:4318 \
-p 55681:55681 \
logzio/otel-collector-traces
Replace <<TRACING-SHIPPING-TOKEN>>
with the token of the account you want to ship to.
If your account is hosted in any region other than us
, replace <LOGZIO_ACCOUNT_REGION_CODE>
with the applicable region code.
If your account is hosted in us
, remove region:
line from the config.
Run the application
Normally, when you run the OTEL collector in a Docker container, your application will run in separate containers on the same host. In this case, you need to make sure that all your application containers share the same network as the OTEL collector container. One way to achieve this, is to run all containers, including the OTEL collector, with a Docker-compose configuration. Docker-compose automatically makes sure that all containers with the same configuration are sharing the same network.
Run the application to generate traces.
Check Logz.io for your traces
Give your traces some time to get from your system to ours, and then open Tracing.