Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Add a simple tracing setup to the docker-compose #1024

Merged
merged 2 commits into from
Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ We use the following categories for changes:
- Add `ps_trace.get_trace_retention_period()` database function to get current trace retention period [#1015]
- Add ability to set additional environment variables in helm chart [#1041]
- Add OpenTelemetry tracing instrumentation to metric ingest codepath
- Add example tracing setup to docker-compose [#1024]

### Changed
- Rename CLI flags to improve user interface [#964]
Expand Down
27 changes: 26 additions & 1 deletion docker-compose/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ services:

prometheus:
image: prom/prometheus:latest
depends_on:
- promscale
ports:
- 9090:9090/tcp
volumes:
Expand All @@ -20,14 +22,37 @@ services:
image: timescale/promscale:latest
ports:
- 9201:9201/tcp
- 9202:9202/tcp
restart: on-failure
depends_on:
- db
- prometheus
environment:
PROMSCALE_DB_CONNECT_RETRIES: 10
PROMSCALE_WEB_TELEMETRY_PATH: /metrics-text
PROMSCALE_DB_URI: postgres://postgres:password@db:5432/postgres?sslmode=allow
PROMSCALE_ENABLE_FEATURE: tracing
PROMSCALE_OTLP_GRPC_SERVER_LISTEN_ADDRESS: ":9202"
PROMSCALE_TELEMETRY_TRACE_JAEGER_ENDPOINT: "http://otel-collector:14268/api/traces"
PROMSCALE_TELEMETRY_TRACE_SAMPLING_RATIO: "0.1"

otel-collector:
platform: linux/amd64
image: "otel/opentelemetry-collector:0.41.0"
command: [ "--config=/etc/otel-collector-config.yml" ]
volumes:
- ./otel-collector-config.yml:/etc/otel-collector-config.yml
ports:
- "14268:14268" # jaeger http

jaeger:
image: jaegertracing/jaeger-query:1.30.0
environment:
SPAN_STORAGE_TYPE: grpc-plugin
command: [
"--grpc-storage.server=promscale:9202",
]
ports:
- "16686:16686"

node_exporter:
image: quay.io/prometheus/node-exporter
Expand Down
27 changes: 27 additions & 0 deletions docker-compose/otel-collector-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
receivers:
jaeger:
protocols:
thrift_http:
endpoint: "0.0.0.0:14268"

exporters:
logging:
otlp:
endpoint: promscale:9202
tls:
insecure: true

processors:
batch:

service:
telemetry:
logs:
level: "debug"

pipelines:
traces:
receivers: [jaeger]
exporters: [otlp, logging]
processors: [batch]