Move equinix watch things

This commit is contained in:
2023-10-11 09:16:47 -04:00
parent 1ee5ac51e7
commit 6f8d6220fa
2 changed files with 94 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
# 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]