forked from wundergraph/cosmo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathotel-config.yaml
66 lines (62 loc) · 1.97 KB
/
otel-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
receivers:
otlp:
protocols:
grpc:
endpoint: '0.0.0.0:4317'
auth:
authenticator: jwt
http:
endpoint: '0.0.0.0:4318'
auth:
authenticator: jwt
processors:
attributes/from_auth_context:
actions:
- key: wg.organization.id
from_context: auth.organization_id
action: insert
- key: wg.federated_graph.id
from_context: auth.federated_graph_id
action: insert
batch:
send_batch_size: 10000
timeout: 5s
exporters:
clickhouse:
endpoint: ${CLICKHOUSE_ENDPOINT}
timeout: 10s
database: cosmo
traces_table_name: otel_traces
metrics_table_name: otel_metrics
ttl_days: 30
sending_queue:
queue_size: 5000
storage: file_storage/clickhouse
retry_on_failure:
enabled: true
initial_interval: 5s
max_interval: 30s
max_elapsed_time: 300s
extensions:
# When persistent queue is enabled, the batches are being buffered using the provided storage extension - filestorage is a popular and safe choice.
# If the collector instance is killed while having some items in the persistent queue, on restart the items will be picked and the exporting is continued.
file_storage/clickhouse:
directory: /var/lib/otelcol/file_storage/clickhouse
health_check:
path: /health
endpoint: 0.0.0.0:13133
jwt:
secret: ${OTEL_INGEST_JWT_SECRET}
service:
extensions: [health_check, jwt, file_storage/clickhouse]
pipelines:
metrics:
receivers: [otlp]
# Order is important here. Otherwise, the attributes processor will not be able to read the attributes from the auth context.
processors: [attributes/from_auth_context, batch]
exporters: [clickhouse]
traces:
receivers: [otlp]
# Order is important here. Otherwise, the attributes processor will not be able to read the attributes from the auth context.
processors: [attributes/from_auth_context, batch]
exporters: [clickhouse]