Skip to content

Commit 50f04c1

Browse files
committed
chore: update otel example
1 parent b1800df commit 50f04c1

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

example/otel/docker-compose.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ services:
1212
timeout: 1s
1313
retries: 30
1414
volumes:
15-
- ch_data1:/var/lib/clickhouse
15+
- ch_data2:/var/lib/clickhouse
1616
ports:
1717
- '8123:8123'
1818
- '9000:9000'
@@ -26,17 +26,17 @@ services:
2626
POSTGRES_PASSWORD: uptrace
2727
POSTGRES_DB: uptrace
2828
healthcheck:
29-
test: ['CMD-SHELL', 'pg_isready']
29+
test: ['CMD-SHELL', 'pg_isready', '-U', 'uptrace', '-d', 'uptrace']
3030
interval: 1s
3131
timeout: 1s
3232
retries: 30
3333
volumes:
34-
- 'pg_data1:/var/lib/postgresql/data/pgdata'
34+
- 'pg_data2:/var/lib/postgresql/data/pgdata'
3535
ports:
3636
- '5432:5432'
3737

3838
uptrace:
39-
image: 'uptrace/uptrace:1.4.7'
39+
image: 'uptrace/uptrace:1.5.0'
4040
#image: 'uptrace/uptrace-dev:latest'
4141
restart: on-failure
4242
volumes:
@@ -51,7 +51,7 @@ services:
5151
condition: service_healthy
5252

5353
otelcol:
54-
image: otel/opentelemetry-collector-contrib:0.58.0
54+
image: otel/opentelemetry-collector-contrib:0.70.0
5555
restart: on-failure
5656
volumes:
5757
- ./config/otel-collector.yaml:/etc/otelcol-contrib/config.yaml
@@ -78,5 +78,5 @@ services:
7878
image: redis
7979

8080
volumes:
81-
ch_data1:
82-
pg_data1:
81+
ch_data2:
82+
pg_data2:

example/otel/uptrace.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,30 +79,30 @@ metrics_from_spans:
7979
description: Spans duration (excluding events)
8080
instrument: histogram
8181
unit: microseconds
82-
value: span.duration / 1000
82+
value: .duration / 1000
8383
attrs:
84-
- span.system
85-
- span.group_id
84+
- .system
85+
- .group_id
8686
- service.name
8787
- host.name
88-
- span.status_code
88+
- .status_code
8989
annotations:
90-
- span.name
91-
where: not span.is_event
90+
- display.name
91+
where: .event_name = ''
9292

9393
- name: uptrace.tracing.events
9494
description: Events count (excluding spans)
9595
instrument: counter
9696
unit: 1
97-
value: span.count
97+
value: .count
9898
attrs:
99-
- span.system
100-
- span.group_id
101-
- service.name
99+
- .system
100+
- .group_id
101+
- .name
102102
- host.name
103103
annotations:
104-
- span.event_name
105-
where: span.is_event
104+
- display.name
105+
where: .is_event = 1
106106

107107
##
108108
## To require authentication, uncomment one of the following sections.
@@ -247,7 +247,7 @@ smtp_mailer:
247247
##
248248
## Logging configuration.
249249
##
250-
logs:
250+
logging:
251251
# Zap minimal logging level.
252252
# Valid values: DEBUG, INFO, WARN, ERROR, DPANIC, PANIC, FATAL.
253253
level: INFO

0 commit comments

Comments
 (0)