filter attributes on info or higher level

This commit is contained in:
Adil Hafeez 2026-02-09 12:00:10 -08:00
parent 5c93c8f9c1
commit acb3edf5ff
No known key found for this signature in database
GPG key ID: 9B18EF7691369645
2 changed files with 7 additions and 2 deletions

View file

@ -124,11 +124,15 @@ impl SpanExporter for ServiceNameOverrideExporter {
// Group spans by their effective service name
let mut spans_by_service: HashMap<String, Vec<SpanData>> = HashMap::new();
let should_filter = !tracing::enabled!(tracing::Level::DEBUG);
for span in batch {
let mut span = span;
span.attributes
.retain(|kv| !FILTERED_ATTR_KEYS.contains(&kv.key.as_str()));
if should_filter {
span.attributes
.retain(|kv| !FILTERED_ATTR_KEYS.contains(&kv.key.as_str()));
}
let service_name = span
.attributes

View file

@ -10,6 +10,7 @@ services:
- ARCH_CONFIG_PATH=/app/arch_config.yaml
- OPENAI_API_KEY=${OPENAI_API_KEY:?OPENAI_API_KEY environment variable is required but not set}
- OTEL_TRACING_GRPC_ENDPOINT=http://jaeger:4317
- LOG_LEVEL=${LOG_LEVEL:-info}
volumes:
- ./config.yaml:/app/arch_config.yaml:ro
- /etc/ssl/cert.pem:/etc/ssl/cert.pem