Kong's OpenTelemetry integration with Datadog via OTEL Collector
Create your own .env file and provide the required values. They are required to run the containers.
Please retrieve the Datadog API Key from your organsation settings. You can find the instructions here - DataDog Account Management
DD_API_KEY=
POSTGRES_PASSWORD=
For Kong enterprise users, you can load the license by sending a request Kong Admin API
http POST :8001/licenses \
payload='LICENSE_KEY'
Configuration can be found in ./config/collector.yaml
The docker compose will spin up Kong Gateway, Postgres and OTEL Colletor
- Start Docker Compose
docker-compose up -d
- Tear-down
docker-compose down
http :8001/services url=https://mockbin.org/request name=ot-demo
http :8001/services/ot-demo/routes name=ot-route expression='(http.path ^= "/ot2" || http.path ^= "/ot1")'
curl -X POST http:https://localhost:8001/plugins/ \
--data "name=opentelemetry" \
--data "config.endpoint=http:https://otelcol:4318/v1/traces" \
--data "config.batch_span_count=200" \
--data "config.batch_flush_delay=3"
http POST :8000/ot1 "X-Foo:hello OT1"
http GET :8000/ot2 "X-Foo:hello OT2"
You should see the trace coming in your DataDog dashboard