-
-
Notifications
You must be signed in to change notification settings - Fork 199
Open
Description
Sharing config of working Uptrace v1.7.8 instance.
FROM uptrace/uptrace:1.7.8
RUN ln -s /uptrace_linux_amd64 /uptraceuptrace/example/docker/docker-compose.yml
version: '3'
services:
clickhouse:
image: clickhouse/clickhouse-server:24.7
restart: on-failure
environment:
CLICKHOUSE_DB: uptrace
healthcheck:
test: ['CMD', 'wget', '--spider', '-q', 'localhost:8123/ping']
interval: 1s
timeout: 1s
retries: 30
volumes:
- ch_data2:/var/lib/clickhouse
ports:
- '8123:8123'
- '9000:9000'
postgres:
image: postgres:15-alpine
restart: on-failure
environment:
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_USER: uptrace
POSTGRES_PASSWORD: uptrace
POSTGRES_DB: uptrace
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U uptrace -d uptrace']
interval: 1s
timeout: 1s
retries: 30
volumes:
- 'pg_data3:/var/lib/postgresql/data/pgdata'
ports:
- '5432:5432'
uptrace:
#image: 'uptrace/uptrace-dev:latest'
build: .
restart: on-failure
volumes:
- ./uptrace.yml:/etc/uptrace/uptrace.yml
#environment:
# - DEBUG=2
ports:
- '14317:14317'
- '14318:14318'
depends_on:
- clickhouse
- postgres
otelcol:
image: otel/opentelemetry-collector-contrib:0.88.0
restart: on-failure
volumes:
- ./otel-collector.yaml:/etc/otelcol-contrib/config.yaml
ports:
- '4317:4317'
- '4318:4318'
extra_hosts:
- 'host.docker.internal:host-gateway'
depends_on:
- uptrace
mailpit:
image: axllent/mailpit
restart: always
ports:
- 1025:1025
- 8025:8025
environment:
MP_MAX_MESSAGES: 5000
MP_DATA_FILE: /data/mailpit.db
MP_SMTP_AUTH_ACCEPT_ANY: 1
MP_SMTP_AUTH_ALLOW_INSECURE: 1
volumes:
- mailpit_data:/data
vector:
image: timberio/vector:0.28.X-alpine
volumes:
- ./vector.toml:/etc/vector/vector.toml:ro
grafana:
image: grafana/grafana:9.5.3
restart: on-failure
volumes:
- ../../config/grafana/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
- ../../config/grafana/custom.ini:/etc/grafana/grafana.ini
ports:
- '3000:3000'
extra_hosts:
- 'host.docker.internal:host-gateway'
prometheus:
image: prom/prometheus:v2.36.2
restart: always
volumes:
- ../../config/prometheus/:/etc/prometheus/
- prometheus_data:/prometheus
command:
- '--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'
extra_hosts:
- 'host.docker.internal:host-gateway'
node_exporter:
image: quay.io/prometheus/node-exporter:latest
container_name: node_exporter
command:
- '--path.rootfs=/host'
network_mode: host
pid: host
restart: unless-stopped
volumes:
- '/:/host:ro,rslave'
volumes:
ch_data2:
pg_data3:
prometheus_data:
mailpit_data:
uptrace/example/docker/uptrace.yml
##
## Uptrace configuration file.
## See https://uptrace.dev/get/config.html for details.
##
## You can use environment variables anywhere in this file, for example:
##
## foo: $FOO
## bar: ${BAR}
## baz: ${BAZ:default}
##
## To escape `$`, use `$$`, for example:
##
## foo: $$FOO_BAR
##
##
## ClickHouse database credentials.
##
ch:
addr: clickhouse:9000
user: default
password:
database: uptrace
# TLS configuration. Uncomment to enable.
# tls:
# insecure_skip_verify: true
# Maximum query execution time.
max_execution_time: 30s
##
## PostgreSQL db that is used to store metadata such us metric names, dashboards, alerts,
## and so on.
##
pg:
addr: postgres:5432
user: uptrace
password: uptrace
database: uptrace
# TLS configuration. Uncomment to enable.
# tls:
# insecure_skip_verify: true # only for self-signed certificates
##
## A list of pre-configured projects. Each project is fully isolated.
##
projects:
# Conventionally, the first project is used to monitor Uptrace itself.
- id: 1
name: Uptrace
# Token grants write access to the project. Keep a secret.
token: project1_secret_token
pinned_attrs:
- service
- host_name
- deployment_environment
# Group spans by deployment.environment attribute.
group_by_env: false
# Group funcs spans by service.name attribute.
group_funcs_by_service: false
# Enable prom_compat if you want to use the project as a Prometheus datasource in Grafana.
prom_compat: true
# Other projects can be used to monitor your applications.
# To monitor micro-services or multiple related services, use a single project.
- id: 2
name: My project
token: project2_secret_token
pinned_attrs:
- service
- host_name
- deployment_environment
# Group spans by deployment.environment attribute.
group_by_env: false
# Group funcs spans by service.name attribute.
group_funcs_by_service: false
prom_compat: true
##
## To require authentication, uncomment one of the following sections.
##
auth:
users:
- name: Anonymous
email: uptrace@localhost
password: uptrace
notify_by_email: true
# Cloudflare Zero Trust Access (Identity)
# See https://developers.cloudflare.com/cloudflare-one/identity/ for more info.
# cloudflare:
# # The base URL of the Cloudflare Zero Trust team.
# - team_url: https://myteam.cloudflareaccess.com
# # The Application Audience (AUD) Tag for this application.
# # You can retrieve this from the Cloudflare Zero Trust 'Access' Dashboard.
# audience: bea6df23b944e4a0cd178609ba1bb64dc98dfe1f66ae7b918e563f6cf28b37e0
# OpenID Connect (Single Sign-On)
oidc:
# # The ID is used in API endpoints, for example, in redirect URL
# # `http://<uptrace-host>/api/v1/sso/<oidc-id>/callback`.
# - id: keycloak
# # Display name for the button in the login form.
# # Default to 'OpenID Connect'
# display_name: Keycloak
# # The base URL for the OIDC provider.
# issuer_url: http://localhost:8080/realms/uptrace
# # The OAuth 2.0 Client ID
# client_id: uptrace
# # The OAuth 2.0 Client Secret
# client_secret: ogbhd8Q0X0e5AZFGSG3m9oirPvnetqkA
# # Additional OAuth 2.0 scopes to request from the OIDC provider.
# # Defaults to 'profile'. 'openid' is requested by default and need not be specified.
# scopes:
# - profile
##
## Various options to tweak ClickHouse schema.
## For changes to take effect, you need reset the ClickHouse database with `ch reset`.
##
ch_schema:
# Compression codec, for example, LZ4, ZSTD(3), or Default.
compression: ZSTD(3)
# Whether to use ReplicatedMergeTree instead of MergeTree.
replicated: false
# Cluster name for Distributed tables and ON CLUSTER clause.
#cluster: uptrace1
spans:
# Delete spans data after 30 days.
ttl_delete: 7 DAY
storage_policy: 'default'
metrics:
# Delete metrics data after 90 days.
ttl_delete: 30 DAY
storage_policy: 'default'
##
## Addresses on which Uptrace receives gRPC and HTTP requests.
##
listen:
# OTLP/gRPC API.
grpc:
addr: ':14317'
# OTLP/HTTP API and Uptrace API with UI.
http:
addr: ':14318'
# tls:
# cert_file: config/tls/uptrace.crt
# key_file: config/tls/uptrace.key
##
## Various options for Uptrace UI.
##
site:
# Overrides public URL for Vue-powered UI in case you put Uptrace behind a proxy.
#addr: 'https://uptrace.mydomain.com/'
##
## Spans processing options.
##
spans:
# The size of the Go chan used to buffer incoming spans.
# If the buffer is full, Uptrace starts to drop spans.
#buffer_size: 100000
# The number of spans to insert in a single query.
#batch_size: 10000
##
## Metrics processing options.
##
metrics:
# List of attributes to drop for being noisy.
drop_attrs:
- telemetry.sdk.language
- telemetry.sdk.name
- telemetry.sdk.version
# The size of the Go chan used to buffer incoming measures.
# If the buffer is full, Uptrace starts to drop measures.
#buffer_size: 100000
# The number of measures to insert in a single query.
#batch_size: 10000
##
## uptrace-go client configuration.
## Uptrace sends internal telemetry here. Defaults to listen.grpc.addr.
##
uptrace_go:
# Enabled by default.
# disabled: true
# dsn: http://project1_secret_token@localhost:14317/1
# tls:
# cert_file: config/tls/uptrace.crt
# key_file: config/tls/uptrace.key
# insecure_skip_verify: true
##
## SMTP settings to send emails.
## https://uptrace.dev/get/alerting.html
##
# smtp_mailer:
# # Whether to use this mailer for sending emails.
# enabled: true
# # SMTP server host.
# host: mailpit
# # SMTP server port.
# port: 1025
# # Username for authentication.
# username: mailpit
# # Password for authentication.
# password: mailpit
# # Disable TLS. Opportunistic TLS is used by default.
# tls: { disabled: true }
# # Emails will be send from this address.
# from: 'uptrace@localhost'
##
## Logging configuration.
##
logs:
# Zap minimal logging level.
# Valid values: DEBUG, INFO, WARN, ERROR, DPANIC, PANIC, FATAL.
level: INFO
# Secret key that is used to sign JWT tokens etc.
secret_key: 102c1a557c314fc28198acd017960843
# Enable to log HTTP requests and database queries.
debug: false
- name: Run OpenTelemetry Collector container
community.docker.docker_container:
name: opentelemetry-collector
image: otel/opentelemetry-collector-contrib:0.123.0
pid_mode: host
restart_policy: always
user: "0:0"
networks:
- name: observability-net
volumes:
- /etc/otelcol-contrib/config.yaml:/etc/otelcol-contrib/config.yaml:ro
# === Docker metrics & logs access ===
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
# === For container log enrichment (hostfs) ===
- /proc:/hostfs/proc:ro
- /sys:/hostfs/sys:ro
- /:/hostfs:ro
published_ports:
- "0.0.0.0:4317:4317" # gRPC on all interfaces
- "0.0.0.0:4318:4318" # HTTP on all interfaces
state: started
recreate: true
restart: true
env:
HOST_PROC: /hostfs/proc
HOST_SYS: /hostfs/sys
HOST_ROOT: /hostfs
log_driver: json-file
log_options:
max-size: "10m"
max-file: "5"
otel/etc/otelcol-contrib/config.yaml
processors:
resourcedetection:
detectors: [env, system, docker]
cumulativetodelta:
batch:
send_batch_size: 10000
timeout: 10s
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
hostmetrics:
scrapers:
cpu:
disk:
filesystem:
load:
memory:
network:
paging:
docker_stats:
endpoint: unix:///var/run/docker.sock
collection_interval: 30s
metrics:
container.cpu.utilization:
enabled: true
container.cpu.usage.percpu:
enabled: true
container.network.io.usage.tx_dropped:
enabled: false
exporters:
debug:
otlp/uptrace:
endpoint: http://172.25.0.200:14317
tls: { insecure: true }
headers:
uptrace-dsn: 'http://project1_secret_token@localhost:14318?grpc=14317'
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [otlp/uptrace]
metrics:
receivers: [otlp]
processors: [cumulativetodelta, batch]
exporters: [otlp/uptrace]
metrics/host:
receivers: [hostmetrics, docker_stats]
processors: [cumulativetodelta, batch, resourcedetection]
exporters: [otlp/uptrace]
logs:
receivers: [otlp]
processors: [batch]
exporters: [otlp/uptrace]
Metadata
Metadata
Assignees
Labels
No labels