Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ services:
- FLAGD_PORT
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},data_sensitivity=high
- OTEL_SERVICE_NAME=payment
depends_on:
otel-collector:
Expand Down
18 changes: 16 additions & 2 deletions src/otel-collector/otelcol-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,22 +206,36 @@ processors:
# SANITIZE ALL SPAN NAMES TO PREVENT CARDINALITY EXPLOSION
- set_semconv_span_name("1.37.0", "original_span_name")

transform/redact_sensitive:
error_mode: ignore
trace_statements:
- context: span
statements:
- set(attributes["redacted"], true) where resource.attributes["data_sensitivity"] == "high"
- keep_keys(attributes, ["redacted"]) where resource.attributes["data_sensitivity"] == "high"
log_statements:
- context: log
statements:
- set(body, "REDACTED") where resource.attributes["data_sensitivity"] == "high"
- set(attributes["redacted"], true) where resource.attributes["data_sensitivity"] == "high"
- keep_keys(attributes, ["redacted"]) where resource.attributes["data_sensitivity"] == "high"

connectors:
spanmetrics:

service:
pipelines:
traces:
receivers: [otlp]
processors: [resourcedetection, memory_limiter, transform/sanitize_spans]
processors: [resourcedetection, memory_limiter, transform/sanitize_spans, transform/redact_sensitive]
exporters: [otlp_grpc/jaeger, debug, spanmetrics]
metrics:
receivers: [docker_stats, httpcheck/frontend-proxy, hostmetrics, nginx, otlp, postgresql, redis, spanmetrics, kafkametrics]
processors: [resourcedetection, memory_limiter]
exporters: [otlp_http/prometheus, debug]
logs:
receivers: [otlp]
processors: [resourcedetection, memory_limiter]
processors: [resourcedetection, memory_limiter, transform/redact_sensitive]
exporters: [opensearch, debug]
telemetry:
metrics:
Expand Down