-
Notifications
You must be signed in to change notification settings - Fork 157
Expand file tree
/
Copy pathotel-agent-config.yaml
More file actions
96 lines (86 loc) · 3.34 KB
/
Copy pathotel-agent-config.yaml
File metadata and controls
96 lines (86 loc) · 3.34 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# For schema documentation, including required properties, semantics, default behavior, etc,
# see: https://github.com/open-telemetry/opentelemetry-configuration/blob/main/schema-docs.md
file_format: "1.0"
resource:
attributes:
- name: service.name
value: spring-boot-declarative-config-example
# Read resource attributes from the OTEL_RESOURCE_ATTRIBUTES environment variable.
# This aligns well with the OpenTelemetry Operator and other deployment methods.
attributes_list: ${OTEL_RESOURCE_ATTRIBUTES}
detection/development:
detectors:
- service: # will add "service.instance.id" and "service.name" from the OTEL_SERVICE_NAME env var
- host:
- process:
- container:
propagator:
composite:
- tracecontext:
- baggage:
instrumentation/development:
java:
common:
# Map peer addresses (host names or IP addresses) of outgoing client calls
# to a logical service name. Matching client spans get a "peer.service"
# attribute set to the configured service_name (port is optional; omitting
# it matches any port). Previously configured via the
# otel.instrumentation.common.peer-service-mapping property.
service_peer_mapping:
- peer: localhost
service_name: example-backend
general:
http:
client:
request_captured_headers: # was otel.instrumentation.http.client.capture-request-headers
- Content-Type
- Accept
response_captured_headers: # was otel.instrumentation.http.client.capture-response-headers
- Content-Type
- Content-Encoding
server:
request_captured_headers: # was otel.instrumentation.http.server.capture-request-headers
- Content-Type
- Accept
response_captured_headers: # was otel.instrumentation.http.server.capture-response-headers
- Content-Type
- Content-Encoding
# Read backend endpoint from the OTEL_EXPORTER_OTLP_ENDPOINT environment variable.
# This aligns well with the OpenTelemetry Operator and other deployment methods.
tracer_provider:
processors:
- batch:
exporter:
otlp_http:
endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://localhost:4318}/v1/traces
# Configure a console exporter for exploring without a collector/backend
- batch:
exporter:
console:
# Configure sampling to exclude health check endpoints
sampler:
rule_based_routing:
fallback_sampler:
always_on:
# Filter to spans of this span_kind. Must be one of: SERVER, CLIENT, INTERNAL, CONSUMER, PRODUCER.
span_kind: SERVER # only apply to server spans
# List of rules describing spans to drop. Spans are dropped if they match one of the rules.
rules:
# The action to take when the rule is matches. Must be of: DROP, RECORD_AND_SAMPLE.
- action: DROP
# The span attribute to match against.
attribute: url.path
# The pattern to compare the span attribute to.
pattern: /actuator.*
meter_provider:
readers:
- periodic:
exporter:
otlp_http:
endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://localhost:4318}/v1/metrics
logger_provider:
processors:
- batch:
exporter:
otlp_http:
endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://localhost:4318}/v1/logs