Devenv: Add tempo data source (#31138)

* Add tempo DS to devenv

* Remove unsupported values from config

* Add tempo ds

* Remove tempo-query
pull/31711/head^2
Andrej Ocenas 4 years ago committed by GitHub
parent ae9255e568
commit f029e84565
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      devenv/datasources.yaml
  2. 18
      devenv/docker/blocks/loki/README.md
  3. 4
      devenv/docker/blocks/tempo/README.md
  4. 8
      devenv/docker/blocks/tempo/docker-compose.yaml
  5. 41
      devenv/docker/blocks/tempo/tempo.yaml

@ -269,3 +269,10 @@ datasources:
access: proxy
url: http://localhost:9411
editable: false
- name: gdev-tempo
type: tempo
uid: gdev-tempo
access: proxy
url: http://localhost:3101
editable: false

@ -0,0 +1,18 @@
By default this block is setup to scrape logs from /var/logs. If you need to log some service from the docker-compse you can add:
```
# For this to work you need to install the logging driver see https://github.com/grafana/loki/tree/master/cmd/docker-driver#plugin-installation
logging:
driver: loki
options:
loki-url: "http://loki:3100/loki/api/v1/push"
```
This also works for self logging Loki logs if you use `http://localhost:3100/loki/api/v1/push`. This is useful together with
```
environment:
- JAEGER_AGENT_HOST=tempo
- JAEGER_AGENT_PORT=6831
- JAEGER_SAMPLER_TYPE=const
- JAEGER_SAMPLER_PARAM=1
```
which sets up a tracing and so you will have logs with traceIDs to test linking between logs and traces.

@ -0,0 +1,4 @@
Right now Tempo is before stable release so this uses :latest tag which means there can be changes depending on when
you pull the image.
For adding some traces easily you can run Loki block and enable tracing (see ../loki/README.md)

@ -0,0 +1,8 @@
tempo:
image: grafana/tempo:latest
command: ["-config.file=/etc/tempo.yaml"]
ports:
- "6831:6831"
- "3101:3101"
volumes:
- ./docker/blocks/tempo/tempo.yaml:/etc/tempo.yaml

@ -0,0 +1,41 @@
auth_enabled: false
server:
http_listen_port: 3101
distributor:
receivers: # this configuration will listen on all ports and protocols that tempo is capable of.
jaeger: # the receives all come from the OpenTelemetry collector. more configuration information can
protocols: # be found there: https://github.com/open-telemetry/opentelemetry-collector/tree/master/receiver
thrift_http: #
grpc: # for a production deployment you should only enable the receivers you need!
thrift_binary:
thrift_compact:
zipkin:
otlp:
protocols:
http:
grpc:
opencensus:
ingester:
trace_idle_period: 10s # the length of time after a trace has not received spans to consider it complete and flush it
max_block_duration: 5m # this much time passes
compactor:
compaction:
compaction_window: 1h # blocks in this time window will be compacted together
max_compaction_objects: 1000000 # maximum size of compacted blocks
block_retention: 1h
compacted_block_retention: 10m
storage:
trace:
backend: local # backend configuration to use
wal:
path: /tmp/tempo/wal # where to store the the wal locally
local:
path: /tmp/tempo/blocks
pool:
max_workers: 100 # the worker pool mainly drives querying, but is also used for polling the blocklist
queue_depth: 10000
Loading…
Cancel
Save