-
Notifications
You must be signed in to change notification settings - Fork 67
/
otel-config.yaml
43 lines (43 loc) · 1.3 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
extensions:
health_check: {}
receivers:
otlp:
protocols:
grpc:
http:
fluentforward:
endpoint: 0.0.0.0:8006
processors:
batch:
transform:
log_statements:
- context: log
statements:
# The OpenTelemetry log SDK says the trace context should be encoded in trace_id and span_id,
# but New Relic conventions expects the fields to be dot delimited trace.id and span.id. We
# use the transform processor to replace trace_id => trace.id, span_id => span.id.
# https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/README.md#trace-context-in-legacy-formats
- replace_pattern(body, "\"trace_id\":", "\"trace.id\":")
- replace_pattern(body, "\"span_id\":", "\"span.id\":")
exporters:
debug:
verbosity: $LOG_EXPORTER_LOG_VERBOSITY
otlphttp:
endpoint: $NEW_RELIC_OTLP_ENDPOINT
headers:
api-key: $NEW_RELIC_API_KEY
service:
extensions: [health_check]
pipelines:
metrics:
receivers: [otlp]
processors: [batch]
exporters: [ otlphttp]
traces:
receivers: [otlp]
processors: [ batch ]
exporters: [ debug, otlphttp]
logs:
receivers: [fluentforward]
processors: [ transform, batch ]
exporters: [debug, otlphttp]