From f5109c595ccbca40459927bb3408c8294581408c Mon Sep 17 00:00:00 2001 From: "A. Stoewer" Date: Thu, 1 Dec 2022 23:24:46 +1000 Subject: [PATCH] Use xk6-client-tracing in examples to generate traces (#1920) * Use xk6-client-tracing in examples to generate traces Replace the synthetic-load-generator with xk6-client-tracing in docker-compose examples The grafana7.4 example still uses the load generator because it requires the generated trace IDs to be logged for querying * Move load-generator.json to grafana7.4 example The file is no longer used by multiple examples * Pin xk6-client-tracing version to v0.0.2 * Mention fix for #902 in change log * Upgrade to Grafana 9.3.0 in docker-compose examples --- CHANGELOG.md | 1 + example/docker-compose/agent/agent.yaml | 4 ++-- example/docker-compose/agent/docker-compose.yaml | 14 +++++++------- example/docker-compose/azure/docker-compose.yaml | 12 +++++------- .../docker-compose/distributed/docker-compose.yaml | 14 +++++++------- example/docker-compose/gcs/docker-compose.yaml | 12 +++++------- .../docker-compose/grafana7.4/docker-compose.yaml | 2 +- .../{shared => grafana7.4}/load-generator.json | 0 example/docker-compose/local/docker-compose.yaml | 12 +++++------- example/docker-compose/loki/docker-compose.yaml | 2 +- .../otel-collector-multitenant/docker-compose.yaml | 14 +++++++------- .../otel-collector.multitenant.yaml | 8 ++++---- .../otel-collector/docker-compose.yaml | 14 +++++++------- .../otel-collector/otel-collector.yaml | 10 +++++----- example/docker-compose/s3/docker-compose.yaml | 12 +++++------- .../scalable-single-binary/docker-compose.yaml | 14 +++++++------- .../tempo-search/docker-compose.yaml | 10 ++++------ 17 files changed, 73 insertions(+), 82 deletions(-) rename example/docker-compose/{shared => grafana7.4}/load-generator.json (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab1a3acd09b..6498f173890 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -99,6 +99,7 @@ Internal types are updated to use `scope` instead of `instrumentation_library`. * [BUGFIX] Fix failing SearchTagValues endpoint after startup [#1813](https://github.com/grafana/tempo/pull/1813) (@stoewer) * [BUGFIX] tempo-mixin: tweak dashboards to support metrics without `cluster` label present [#1913](https://github.com/grafana/tempo/pull/1913) (@kvrhdn) * [ENHANCEMENT] New tenant dashboard [#1901](https://github.com/grafana/tempo/pull/1901) (@mapno) +* [BUGFIX] Fix docker-compose examples not running on Apple M1 hardware [#1920](https://github.com/grafana/tempo/pull/1920) (@stoewer) ## v1.5.0 / 2022-08-17 diff --git a/example/docker-compose/agent/agent.yaml b/example/docker-compose/agent/agent.yaml index 5ec339c18ec..24945c9921d 100644 --- a/example/docker-compose/agent/agent.yaml +++ b/example/docker-compose/agent/agent.yaml @@ -5,9 +5,9 @@ traces: configs: - name: default receivers: - jaeger: + otlp: protocols: - thrift_http: + grpc: remote_write: - endpoint: tempo:4317 insecure: true diff --git a/example/docker-compose/agent/docker-compose.yaml b/example/docker-compose/agent/docker-compose.yaml index b4c71f48569..844c5aa740b 100644 --- a/example/docker-compose/agent/docker-compose.yaml +++ b/example/docker-compose/agent/docker-compose.yaml @@ -2,13 +2,13 @@ version: "3" services: # Generate fake traces... - synthetic-load-generator: - image: omnition/synthetic-load-generator:1.0.29 - volumes: - - ../shared/load-generator.json:/etc/load-generator.json + k6-tracing: + image: ghcr.io/grafana/xk6-client-tracing:v0.0.2 environment: - - TOPOLOGY_FILE=/etc/load-generator.json - - JAEGER_COLLECTOR_URL=http://agent:14268 + - ENDPOINT=agent:4317 + restart: always + depends_on: + - tempo # And put them in a Grafana Agent pipeline... agent: @@ -45,7 +45,7 @@ services: - "9090:9090" grafana: - image: grafana/grafana:9.1.6 + image: grafana/grafana:9.3.0 volumes: - ../shared/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml environment: diff --git a/example/docker-compose/azure/docker-compose.yaml b/example/docker-compose/azure/docker-compose.yaml index c1ee7dc34f6..cafa6d99799 100644 --- a/example/docker-compose/azure/docker-compose.yaml +++ b/example/docker-compose/azure/docker-compose.yaml @@ -27,13 +27,11 @@ services: depends_on: - azurite - synthetic-load-generator: - image: omnition/synthetic-load-generator:1.0.29 - volumes: - - ../shared/load-generator.json:/etc/load-generator.json + k6-tracing: + image: ghcr.io/grafana/xk6-client-tracing:v0.0.2 environment: - - TOPOLOGY_FILE=/etc/load-generator.json - - JAEGER_COLLECTOR_URL=http://tempo:14268 + - ENDPOINT=tempo:4317 + restart: always depends_on: - tempo @@ -49,7 +47,7 @@ services: - "9090:9090" grafana: - image: grafana/grafana:9.1.6 + image: grafana/grafana:9.3.0 volumes: - ../shared/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml environment: diff --git a/example/docker-compose/distributed/docker-compose.yaml b/example/docker-compose/distributed/docker-compose.yaml index 0f1f95943bc..0b9c78a2d79 100644 --- a/example/docker-compose/distributed/docker-compose.yaml +++ b/example/docker-compose/distributed/docker-compose.yaml @@ -85,13 +85,13 @@ services: - -euc - mkdir -p /data/tempo && minio server /data --console-address ':9001' - synthetic-load-generator: - image: omnition/synthetic-load-generator:1.0.29 - volumes: - - ../shared/load-generator.json:/etc/load-generator.json + k6-tracing: + image: ghcr.io/grafana/xk6-client-tracing:v0.0.2 environment: - - TOPOLOGY_FILE=/etc/load-generator.json - - JAEGER_COLLECTOR_URL=http://distributor:14268 + - ENDPOINT=distributor:4317 + restart: always + depends_on: + - distributor prometheus: image: prom/prometheus:latest @@ -105,7 +105,7 @@ services: - "9090:9090" grafana: - image: grafana/grafana:9.1.6 + image: grafana/grafana:9.3.0 volumes: - ./grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml environment: diff --git a/example/docker-compose/gcs/docker-compose.yaml b/example/docker-compose/gcs/docker-compose.yaml index 65c4e669ed3..b03c630a85f 100644 --- a/example/docker-compose/gcs/docker-compose.yaml +++ b/example/docker-compose/gcs/docker-compose.yaml @@ -22,13 +22,11 @@ services: # This creates an empty tempo bucket - ./gcs-data/:/data/tempo/ - synthetic-load-generator: - image: omnition/synthetic-load-generator:1.0.29 - volumes: - - ../shared/load-generator.json:/etc/load-generator.json + k6-tracing: + image: ghcr.io/grafana/xk6-client-tracing:v0.0.2 environment: - - TOPOLOGY_FILE=/etc/load-generator.json - - JAEGER_COLLECTOR_URL=http://tempo:14268 + - ENDPOINT=tempo:4317 + restart: always depends_on: - tempo @@ -44,7 +42,7 @@ services: - "9090:9090" grafana: - image: grafana/grafana:9.1.6 + image: grafana/grafana:9.3.0 volumes: - ../shared/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml environment: diff --git a/example/docker-compose/grafana7.4/docker-compose.yaml b/example/docker-compose/grafana7.4/docker-compose.yaml index 32592ce038a..6911b6e2f51 100644 --- a/example/docker-compose/grafana7.4/docker-compose.yaml +++ b/example/docker-compose/grafana7.4/docker-compose.yaml @@ -24,7 +24,7 @@ services: synthetic-load-generator: image: omnition/synthetic-load-generator:1.0.25 volumes: - - ../shared/load-generator.json:/etc/load-generator.json + - ./load-generator.json:/etc/load-generator.json environment: - TOPOLOGY_FILE=/etc/load-generator.json - JAEGER_COLLECTOR_URL=http://tempo:14268 diff --git a/example/docker-compose/shared/load-generator.json b/example/docker-compose/grafana7.4/load-generator.json similarity index 100% rename from example/docker-compose/shared/load-generator.json rename to example/docker-compose/grafana7.4/load-generator.json diff --git a/example/docker-compose/local/docker-compose.yaml b/example/docker-compose/local/docker-compose.yaml index d156102135e..e93894bc553 100644 --- a/example/docker-compose/local/docker-compose.yaml +++ b/example/docker-compose/local/docker-compose.yaml @@ -14,13 +14,11 @@ services: - "4318:4318" # otlp http - "9411:9411" # zipkin - synthetic-load-generator: - image: omnition/synthetic-load-generator:1.0.29 - volumes: - - ../shared/load-generator.json:/etc/load-generator.json + k6-tracing: + image: ghcr.io/grafana/xk6-client-tracing:v0.0.2 environment: - - TOPOLOGY_FILE=/etc/load-generator.json - - JAEGER_COLLECTOR_URL=http://tempo:14268 + - ENDPOINT=tempo:4317 + restart: always depends_on: - tempo @@ -36,7 +34,7 @@ services: - "9090:9090" grafana: - image: grafana/grafana:9.1.6 + image: grafana/grafana:9.3.0 volumes: - ../shared/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml environment: diff --git a/example/docker-compose/loki/docker-compose.yaml b/example/docker-compose/loki/docker-compose.yaml index 430ab79fae1..040ab35ccc6 100644 --- a/example/docker-compose/loki/docker-compose.yaml +++ b/example/docker-compose/loki/docker-compose.yaml @@ -45,7 +45,7 @@ services: loki-url: 'http://localhost:3100/loki/api/v1/push' grafana: - image: grafana/grafana:9.1.6 + image: grafana/grafana:9.3.0 volumes: - ./grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml environment: diff --git a/example/docker-compose/otel-collector-multitenant/docker-compose.yaml b/example/docker-compose/otel-collector-multitenant/docker-compose.yaml index 4b1adb2eb80..074c824ff3f 100644 --- a/example/docker-compose/otel-collector-multitenant/docker-compose.yaml +++ b/example/docker-compose/otel-collector-multitenant/docker-compose.yaml @@ -2,13 +2,13 @@ version: "3" services: # Generate fake traces... - synthetic-load-generator: - image: omnition/synthetic-load-generator:1.0.29 - volumes: - - ../shared/load-generator.json:/etc/load-generator.json + k6-tracing: + image: ghcr.io/grafana/xk6-client-tracing:v0.0.2 environment: - - TOPOLOGY_FILE=/etc/load-generator.json - - JAEGER_COLLECTOR_URL=http://otel-collector:14268 + - ENDPOINT=otel-collector:4317 + restart: always + depends_on: + - otel-collector # And put them in an OTEL collector pipeline... otel-collector: @@ -43,7 +43,7 @@ services: - "9090:9090" grafana: - image: grafana/grafana:9.1.6 + image: grafana/grafana:9.3.0 volumes: - ./grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml environment: diff --git a/example/docker-compose/otel-collector-multitenant/otel-collector.multitenant.yaml b/example/docker-compose/otel-collector-multitenant/otel-collector.multitenant.yaml index 8be1e931ff3..6223457eef8 100644 --- a/example/docker-compose/otel-collector-multitenant/otel-collector.multitenant.yaml +++ b/example/docker-compose/otel-collector-multitenant/otel-collector.multitenant.yaml @@ -1,7 +1,7 @@ -receivers: - jaeger: +receivers: + otlp: protocols: - thrift_http: + grpc: exporters: otlp: endpoint: tempo:4317 @@ -12,5 +12,5 @@ exporters: service: pipelines: traces: - receivers: [jaeger] + receivers: [otlp] exporters: [otlp] \ No newline at end of file diff --git a/example/docker-compose/otel-collector/docker-compose.yaml b/example/docker-compose/otel-collector/docker-compose.yaml index 6d0ad23b2a9..82c7a53df85 100644 --- a/example/docker-compose/otel-collector/docker-compose.yaml +++ b/example/docker-compose/otel-collector/docker-compose.yaml @@ -2,13 +2,13 @@ version: "3" services: # Generate fake traces... - synthetic-load-generator: - image: omnition/synthetic-load-generator:1.0.29 - volumes: - - ../shared/load-generator.json:/etc/load-generator.json + k6-tracing: + image: ghcr.io/grafana/xk6-client-tracing:v0.0.2 environment: - - TOPOLOGY_FILE=/etc/load-generator.json - - JAEGER_COLLECTOR_URL=http://otel-collector:14268 + - ENDPOINT=otel-collector:4317 + restart: always + depends_on: + - otel-collector # And put them in an OTEL collector pipeline... otel-collector: @@ -43,7 +43,7 @@ services: - "9090:9090" grafana: - image: grafana/grafana:9.1.6 + image: grafana/grafana:9.3.0 volumes: - ../shared/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml environment: diff --git a/example/docker-compose/otel-collector/otel-collector.yaml b/example/docker-compose/otel-collector/otel-collector.yaml index 91fc8fa86a2..558bc5dafb6 100644 --- a/example/docker-compose/otel-collector/otel-collector.yaml +++ b/example/docker-compose/otel-collector/otel-collector.yaml @@ -1,7 +1,7 @@ -receivers: - jaeger: +receivers: + otlp: protocols: - thrift_http: + grpc: exporters: otlp: endpoint: tempo:4317 @@ -10,5 +10,5 @@ exporters: service: pipelines: traces: - receivers: [jaeger] - exporters: [otlp] \ No newline at end of file + receivers: [otlp] + exporters: [otlp] diff --git a/example/docker-compose/s3/docker-compose.yaml b/example/docker-compose/s3/docker-compose.yaml index 791024caced..fff98cc36bc 100644 --- a/example/docker-compose/s3/docker-compose.yaml +++ b/example/docker-compose/s3/docker-compose.yaml @@ -26,13 +26,11 @@ services: - -euc - mkdir -p /data/tempo && /opt/bin/minio server /data --console-address ':9001' - synthetic-load-generator: - image: omnition/synthetic-load-generator:1.0.29 - volumes: - - ../shared/load-generator.json:/etc/load-generator.json + k6-tracing: + image: ghcr.io/grafana/xk6-client-tracing:v0.0.2 environment: - - TOPOLOGY_FILE=/etc/load-generator.json - - JAEGER_COLLECTOR_URL=http://tempo:14268 + - ENDPOINT=tempo:4317 + restart: always depends_on: - tempo @@ -48,7 +46,7 @@ services: - "9090:9090" grafana: - image: grafana/grafana:9.1.6 + image: grafana/grafana:9.3.0 volumes: - ../shared/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml environment: diff --git a/example/docker-compose/scalable-single-binary/docker-compose.yaml b/example/docker-compose/scalable-single-binary/docker-compose.yaml index d9653959e98..ff3875b1e09 100644 --- a/example/docker-compose/scalable-single-binary/docker-compose.yaml +++ b/example/docker-compose/scalable-single-binary/docker-compose.yaml @@ -60,7 +60,7 @@ services: - ./prometheus.yaml:/etc/prometheus.yaml grafana: - image: grafana/grafana:9.1.6 + image: grafana/grafana:9.3.0 volumes: - ./grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml environment: @@ -82,10 +82,10 @@ services: ports: - 9001:9001 - synthetic-load-generator: - image: omnition/synthetic-load-generator:1.0.29 - volumes: - - ../shared/load-generator.json:/etc/load-generator.json + k6-tracing: + image: ghcr.io/grafana/xk6-client-tracing:v0.0.2 environment: - - TOPOLOGY_FILE=/etc/load-generator.json - - JAEGER_COLLECTOR_URL=http://tempo1:14268 + - ENDPOINT=tempo1:4317 + restart: always + depends_on: + - tempo1 diff --git a/example/docker-compose/tempo-search/docker-compose.yaml b/example/docker-compose/tempo-search/docker-compose.yaml index 4cfe906792d..0aa8fb773da 100644 --- a/example/docker-compose/tempo-search/docker-compose.yaml +++ b/example/docker-compose/tempo-search/docker-compose.yaml @@ -24,13 +24,11 @@ services: # depends_on: # - tempo - synthetic-load-generator: - image: omnition/synthetic-load-generator:1.0.25 - volumes: - - ../shared/load-generator.json:/etc/load-generator.json + k6-tracing: + image: ghcr.io/grafana/xk6-client-tracing:v0.0.2 environment: - - TOPOLOGY_FILE=/etc/load-generator.json - - JAEGER_COLLECTOR_URL=http://tempo:14268 + - ENDPOINT=tempo:4317 + restart: always depends_on: - tempo