-
-
Save bripkens/b222e843e8dcc8afca1d775991774050 to your computer and use it in GitHub Desktop.
OpenTelemetry locally
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 | |
OTEL_SERVICE_NAME=my-service | |
OTEL_TRACES_EXPORTER=otlp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "4.0" | |
services: | |
zipkin-service: | |
image: openzipkin/zipkin:latest | |
ports: | |
- "9411:9411" | |
jaeger-service: | |
image: jaegertracing/all-in-one:latest | |
ports: | |
- "16686:16686" | |
- "14250" | |
- "4317" | |
# expose for manual trace import | |
- "4318:4318" | |
environment: | |
- COLLECTOR_OTLP_ENABLED=true | |
collector: | |
image: otel/opentelemetry-collector:0.72.0 | |
command: [ "--config=/etc/otel-collector-config.yml" ] | |
volumes: | |
- ./otel-config.yml:/etc/otel-collector-config.yml | |
ports: | |
- "4317:4317" | |
depends_on: | |
- jaeger-service | |
- zipkin-service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-Dotel.java.global-autoconfigure.enabled=true | |
-Dotel.metrics.exporter=none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
receivers: | |
otlp: | |
protocols: | |
grpc: | |
http: | |
processors: | |
batch: | |
exporters: | |
otlp: | |
endpoint: jaeger-service:4317 | |
tls: | |
insecure: true | |
zipkin: | |
endpoint: http://zipkin-service:9411/api/v2/spans | |
tls: | |
insecure: true | |
service: | |
pipelines: | |
traces: | |
receivers: [ otlp ] | |
processors: [ batch ] | |
exporters: [ otlp, zipkin ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
split -l 1 spans.json spans- | |
ls | grep spans- | xargs -I {} curl -H 'Content-Type: application/json' \ | |
http://localhost:4318/v1/traces \ | |
--data-binary @{} | |
rm spans-* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment