redis/example/otel/uptrace.yml

266 lines
6.5 KiB
YAML
Raw Permalink Normal View History

2022-10-16 11:11:54 +03:00
##
## 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
##
2022-11-09 16:16:13 +03:00
##
## ClickHouse database credentials.
##
ch:
2023-01-30 11:02:16 +03:00
addr: clickhouse:9000
user: default
password:
database: uptrace
# Maximum query execution time.
max_execution_time: 30s
2023-01-30 11:02:16 +03:00
# TLS configuration. Uncomment to enable.
# tls:
# insecure_skip_verify: true
# TLS configuration. Uncomment to enable.
# tls:
# insecure_skip_verify: true # only for self-signed certificates
2022-11-09 16:16:13 +03:00
##
## 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
2022-10-16 11:11:54 +03:00
##
## 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_name
- host_name
- deployment_environment
2022-11-09 16:16:13 +03:00
# 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
2022-10-16 11:11:54 +03:00
# 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_name
- host_name
- deployment_environment
2022-11-09 16:16:13 +03:00
group_by_env: false
group_funcs_by_service: false
prom_compat: true
2022-11-09 16:16:13 +03:00
##
## Create metrics from spans and events.
##
metrics_from_spans:
2023-01-30 11:02:16 +03:00
- name: uptrace.tracing.spans
2022-11-09 16:16:13 +03:00
description: Spans duration (excluding events)
instrument: histogram
unit: microseconds
value: _duration / 1000
2022-11-09 16:16:13 +03:00
attrs:
- _system
- _group_id
- service_name
- host_name
- _status_code
2023-01-30 11:02:16 +03:00
annotations:
- display_name
where: _event_name = ''
2022-11-09 16:16:13 +03:00
- name: uptrace.tracing.events
description: Events count (excluding spans)
instrument: counter
unit: 1
value: _count
2022-11-09 16:16:13 +03:00
attrs:
- _system
- _group_id
- _name
- host_name
2023-01-30 11:02:16 +03:00
annotations:
- display_name
where: _is_event = 1
2022-10-16 11:11:54 +03:00
##
## To require authentication, uncomment one of the following sections.
2023-01-30 11:02:16 +03:00
##
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.
2023-01-30 11:02:16 +03:00
# 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
2023-01-30 11:02:16 +03:00
2022-10-16 11:11:54 +03:00
##
## 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
2023-01-30 11:02:16 +03:00
storage_policy: 'default'
2022-10-16 11:11:54 +03:00
metrics:
# Delete metrics data after 90 days.
ttl_delete: 30 DAY
2023-01-30 11:02:16 +03:00
storage_policy: 'default'
2022-10-16 11:11:54 +03:00
##
## 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
2022-10-16 11:11:54 +03:00
##
## 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
2022-10-16 11:11:54 +03:00
# 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
2023-01-30 11:02:16 +03:00
##
## uptrace-go client configuration.
## Uptrace sends internal telemetry here. Defaults to listen.grpc.addr.
##
uptrace_go:
# Enabled by default.
#disabled: true
# Defaults to the first projects.
2023-01-30 11:02:16 +03:00
# dsn: http://project1_secret_token@localhost:14317/1
2023-01-30 11:02:16 +03:00
# 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:
enabled: true
host: mailhog
port: 1025
username: mailhog
password: mailhog
from: 'uptrace@localhost'
2023-01-30 11:02:16 +03:00
##
## Logging configuration.
##
2023-06-18 10:25:42 +03:00
logging:
2023-01-30 11:02:16 +03:00
# Zap minimal logging level.
# Valid values: DEBUG, INFO, WARN, ERROR, DPANIC, PANIC, FATAL.
level: INFO
2022-10-16 11:11:54 +03:00
# Secret key that is used to sign JWT tokens etc.
secret_key: 102c1a557c314fc28198acd017960843
# Enable to log HTTP requests and database queries.
debug: false