mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## What changed? <!-- Describe what has changed in this PR --> Added Grafana Tempo - an OTEL collector - to the developer setup. Since we're already using Grafana, Tempo seemed like a logical choice. ## Why? <!-- Tell your future self why have you made these changes --> It allows developers to see all the RPC calls they are making (e.g. when running the server locally or a functional test). Tempo allows filtering by workflow ID. _(note that not _all_ places are tagged yet, but lots of them)_ ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> ``` make start-grafana-tempo make OTEL=true start ``` ``` tctl --ns default namespace register tctl wf start --tq test --wid test -wt test ``` <img width="3352" alt="image" src="https://github.com/user-attachments/assets/5809691a-da32-4a04-8e80-700f8acd47e5" /> And running a functional test from the IDE: <img width="3346" alt="image" src="https://github.com/user-attachments/assets/061bfaf3-0a34-4b4e-a06c-497dfa3a948a" /> ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> Updated docs/development/tracing.md ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) -->
93 lines
2.9 KiB
YAML
93 lines
2.9 KiB
YAML
# Runs all required Temporal service dependencies.
|
|
# Use to run service locally or run integration tests.
|
|
# Include platform specific file also:
|
|
# docker-compose -f docker-compose.yml -f docker-compose.linux.yml up
|
|
services:
|
|
mysql:
|
|
image: mysql:8.0.29-oracle
|
|
container_name: temporal-dev-mysql
|
|
ports:
|
|
- "3306:3306"
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: root
|
|
volumes:
|
|
- ./mysql-init:/docker-entrypoint-initdb.d
|
|
networks:
|
|
- temporal-dev-network
|
|
cassandra:
|
|
image: cassandra:3.11
|
|
container_name: temporal-dev-cassandra
|
|
ports:
|
|
- "9042:9042"
|
|
environment:
|
|
CASSANDRA_LISTEN_ADDRESS: 127.0.0.1
|
|
MAX_HEAP_SIZE: 1G
|
|
HEAP_NEWSIZE: 100M
|
|
networks:
|
|
- temporal-dev-network
|
|
postgresql:
|
|
image: postgres:13.5
|
|
container_name: temporal-dev-postgresql
|
|
ports:
|
|
- "5432:5432"
|
|
environment:
|
|
POSTGRES_USER: temporal
|
|
POSTGRES_PASSWORD: temporal
|
|
networks:
|
|
- temporal-dev-network
|
|
elasticsearch:
|
|
image: elasticsearch:7.10.1
|
|
container_name: temporal-dev-elasticsearch
|
|
ports:
|
|
- "9200:9200"
|
|
environment:
|
|
# Make ES available both on _local_ and _site_,
|
|
# and use _local_ for the publish_host.
|
|
#
|
|
# See here for details on network configuration:
|
|
# https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html
|
|
- network.host=_local_,_site_
|
|
- network.publish_host=_local_
|
|
# Set storage limit to low number.
|
|
- cluster.routing.allocation.disk.threshold_enabled=true
|
|
- cluster.routing.allocation.disk.watermark.low=512mb
|
|
- cluster.routing.allocation.disk.watermark.high=256mb
|
|
- cluster.routing.allocation.disk.watermark.flood_stage=128mb
|
|
- discovery.type=single-node
|
|
- ES_JAVA_OPTS=-Xms100m -Xmx100m
|
|
networks:
|
|
- temporal-dev-network
|
|
prometheus:
|
|
# Use http://localhost:9090/ to access Prometheus.
|
|
image: prom/prometheus:latest
|
|
container_name: temporal-dev-prometheus
|
|
command:
|
|
- "--log.level=error"
|
|
- "--config.file=/etc/prometheus/prometheus.yml"
|
|
- "--storage.tsdb.path=/prometheus"
|
|
- "--web.console.libraries=/usr/share/prometheus/console_libraries"
|
|
- "--web.console.templates=/usr/share/prometheus/consoles"
|
|
grafana:
|
|
# Use http://localhost:3000/ to access Grafana (admin/admin).
|
|
image: grafana/grafana:latest
|
|
container_name: temporal-dev-grafana
|
|
depends_on:
|
|
- prometheus
|
|
volumes:
|
|
- ./grafana/provisioning/:/etc/grafana/provisioning/
|
|
tempo:
|
|
image: grafana/tempo:latest
|
|
container_name: temporal-dev-grafana-tempo
|
|
command:
|
|
- "-config.file=/etc/tempo.yaml"
|
|
volumes:
|
|
- ./grafana/provisioning/tempo/tempo.yaml:/etc/tempo.yaml
|
|
temporal-ui:
|
|
image: temporalio/ui:latest
|
|
container_name: temporal-dev-ui
|
|
|
|
networks:
|
|
temporal-dev-network:
|
|
driver: bridge
|
|
name: temporal-dev-network
|