Files
org-notes/equinix-watch/collector.yaml

45 lines
1005 B
YAML

# otel-collector-config.yaml
receivers:
otlp:
protocols:
grpc: # port 4317
http: # port 4318
processors:
batch:
filter/auditable:
spans:
include:
match_type: strict
attributes:
- key: auditable
value: "true"
transform/customer-facing:
trace_statements:
- context: resource
statements:
- 'keep_keys(attributes, ["service.name"])'
- context: scope
statements:
- 'set(name, "equinixWatch")'
- 'set(version, "1.0.0")'
- context: span
statements:
- 'keep_keys(attributes, ["http.route", "http.method", "http.status_code", "http.scheme", "http.host", "user.id", "http.user_agent"])'
- 'set(name, attributes["http.route"])'
exporters:
file:
path: /data/metrics.json
service:
pipelines:
traces:
receivers: [otlp]
processors:
- filter/auditable
- transform/customer-facing
exporters: [file]