Skip to content

biandratti/agent-integrations

Repository files navigation

Comprehensive Observability and Distributed Tracing with Kamon and OpenTelemetry Build Status codecov

This repository demonstrates how to implement monitoring and tracing in applications built with the Play Framework and ZIO Http using Kamon and OpenTelemetry agents. The main goal is to showcase the concept of traceability across different Scala frameworks and telemetry options.

Build all the apps images

./docker/build-apps.sh

Example 1: Kamon agent

cd docker/kammon && docker compose up

Getting trace_id: app1 -> app2

In the example, the user sends a request to app1 and the same trace id is sent and distributed to app2.

curl -i  --header "context-id: mycontextid" localhost:9001/api/v1/trace


Example 2: OpenTelemetry agent

cd docker/opentelemetry && docker compose up

Getting trace_id: app3 -> (app4 || app5)

In the example, the user sends a request to app3 and the same trace id is sent and distributed to app4 and app5 in parallel.

curl -i  --header "context-id: mycontextid" localhost:9003/api/v1/trace
curl -i  --header "context-id: error" localhost:9003/api/v1/trace


Gatling to build many transactions to display:

sbt -Dusers=1 -Dramp=1 -Dport=9000 Gatling/test [For kamon example]
sbt -Dusers=1 -Dramp=1 -Dport=9003 Gatling/test [For opentelemetry example]