1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

chore: update otel example

This commit is contained in:
Vladimir Mihailenco
2022-11-09 15:16:13 +02:00
parent 1278a8094f
commit dd858eaf07
8 changed files with 164 additions and 22 deletions

View File

@ -0,0 +1,53 @@
# See https://prometheus.io/docs/alerting/latest/configuration/ for details.
global:
# The smarthost and SMTP sender used for mail notifications.
smtp_smarthost: 'mailhog:1025'
smtp_from: 'alertmanager@example.com'
smtp_require_tls: false
receivers:
- name: 'team-X'
email_configs:
- to: 'some-receiver@example.com'
send_resolved: true
# The root route on which each incoming alert enters.
route:
# The labels by which incoming alerts are grouped together. For example,
# multiple alerts coming in for cluster=A and alertname=LatencyHigh would
# be batched into a single group.
group_by: ['alertname', 'cluster', 'service']
# When a new group of alerts is created by an incoming alert, wait at
# least 'group_wait' to send the initial notification.
# This way ensures that you get multiple alerts for the same group that start
# firing shortly after another are batched together on the first
# notification.
group_wait: 30s
# When the first notification was sent, wait 'group_interval' to send a batch
# of new alerts that started firing for that group.
group_interval: 5m
# If an alert has successfully been sent, wait 'repeat_interval' to
# resend them.
repeat_interval: 3h
# A default receiver
receiver: team-X
# All the above attributes are inherited by all child routes and can
# overwritten on each.
# The child route trees.
routes:
# This route matches error alerts created from spans or logs.
- matchers:
- alert_kind="error"
group_interval: 24h
receiver: team-X
# The directory from which notification templates are read.
templates:
- '/etc/alertmanager/template/*.tmpl'

View File

@ -0,0 +1,68 @@
extensions:
health_check:
pprof:
endpoint: 0.0.0.0:1777
zpages:
endpoint: 0.0.0.0:55679
receivers:
otlp:
protocols:
grpc:
http:
hostmetrics:
collection_interval: 10s
scrapers:
cpu:
disk:
load:
filesystem:
memory:
network:
paging:
redis:
endpoint: 'redis-server:6379'
collection_interval: 10s
jaeger:
protocols:
grpc:
processors:
resourcedetection:
detectors: ['system']
batch:
send_batch_size: 10000
timeout: 10s
exporters:
logging:
logLevel: debug
otlp:
endpoint: uptrace:14317
tls:
insecure: true
headers: { 'uptrace-dsn': 'http://project2_secret_token@localhost:14317/2' }
service:
# telemetry:
# logs:
# level: DEBUG
pipelines:
traces:
receivers: [otlp, jaeger]
processors: [batch]
exporters: [otlp, logging]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [otlp]
metrics/hostmetrics:
receivers: [hostmetrics, redis]
processors: [batch, resourcedetection]
exporters: [otlp]
logs:
receivers: [otlp]
processors: [batch]
exporters: [otlp]
extensions: [health_check, pprof, zpages]

View File

@ -0,0 +1,39 @@
[sources.syslog_logs]
type = "demo_logs"
format = "syslog"
interval = 0.1
[sources.apache_common_logs]
type = "demo_logs"
format = "apache_common"
interval = 0.1
[sources.apache_error_logs]
type = "demo_logs"
format = "apache_error"
interval = 0.1
[sources.json_logs]
type = "demo_logs"
format = "json"
interval = 0.1
# Parse Syslog logs
# See the Vector Remap Language reference for more info: https://vrl.dev
[transforms.parse_logs]
type = "remap"
inputs = ["syslog_logs"]
source = '''
. = parse_syslog!(string!(.message))
'''
# Export data to Uptrace.
[sinks.uptrace]
type = "http"
inputs = ["parse_logs", "apache_common_logs", "apache_error_logs", "json_logs"]
encoding.codec = "json"
framing.method = "newline_delimited"
compression = "gzip"
uri = "http://uptrace:14318/api/v1/vector/logs"
#uri = "https://api.uptrace.dev/api/v1/vector/logs"
headers.uptrace-dsn = "http://project2_secret_token@localhost:14317/2"