-
Schemaprocessor in collector-contrib. It's a stub and does not do anything. It's not included into collector-contib image.
-
Search for https://opentelemetry.io/schemas/ does not show if anyone uses transformation logic.
-
There is no schema transformation logic in exporters in
opentelemetry-collector-contrib
repo. -
There is a schema parser https://pkg.go.dev/go.opentelemetry.io/otel/schema/v1.1
Conclusion: there is no publically available and ready to use schema transformation implementation
To get a very rough upper bound estimate of potential transformation solution, let's use manually configured transform processor:
transform:
trace_statements:
- context: span
statements:
- set(attributes["net.protocol.name"], attributes["messaging.protocol"]) where attributes["messaging.protocol"] != nil
- set(attributes["net.protocol.version"], attributes["messaging.protocol_version"]) where attributes["messaging.protocol_version"] != nil
- set(attributes["messaging.destination.name"], attributes["messaging.destination"]) where attributes["messaging.destination"] != nil
- delete_key(attributes, "messaging.destination")
- delete_key(attributes, "messaging.protocol")
- delete_key(attributes, "messaging.protocol_version")
- delete_key(attributes, "messaging.destination_kind")
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [file]
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch, transform]
exporters: [file]
otelcollector:
image: otel/opentelemetry-collector-contrib:0.74.0
command: ["--config=/etc/otel-collector-config.yml"]
mem_limit: 1g
cpus: 1
Transformation overhead ~1.8% throughput
Baseline:
duration, sec | spans | throughput, rps |
---|---|---|
814 | 20000000 | 24570.02457 |
835 | 20000000 | 23952.09581 |
831 | 20000000 | 24067.38869 |
836 | 20000000 | 23923.44498 |
Average: 24128.23851
Transformation:
duration, sec | spans | throughput, rps |
---|---|---|
846 | 20000000 | 23640.66194 |
829 | 20000000 | 24125.45235 |
856 | 20000000 | 23364.48598 |
846 | 20000000 | 23640.66194 |
Average: 23692.81555
CPU and memory: no significant difference, but transformations runs have slightly lower CPU and allocation nrate