forked from open-telemetry/opentelemetry-java-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathotel-agent-config.yaml
More file actions
68 lines (59 loc) · 2.28 KB
/
otel-agent-config.yaml
File metadata and controls
68 lines (59 loc) · 2.28 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
# 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-rc.2"
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: # /development properties may not be supported in all SDKs
detectors:
- service: # will add "service.instance.id" and "service.name" from the OTEL_SERVICE_NAME env var
- host:
- process:
- container:
propagator:
composite:
- tracecontext:
- baggage:
# 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