Log events sent to collector use incorrect encoding of traceid #3892
Labels
bug
Something isn't working
priority:p2
Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect
What happened?
Steps to Reproduce
OTLPLogExporter
and point it at the local collector via HTTP:Expected Result
Actual Result
Additional Details
The issue appears to be that the traceids sent to the collector as part of the log events are base64 encoded and not hex encoded.
Looking through the otel source, there is a
toLogRecord
function that takes auseHex
flag, but I cannot see any point in whichuseHex
does not resolve to false, it appears to be mostly undefined.As a quick check, I forced the
useHex
flag to always be true by hardcoding the flag. Using this version the log record was successfully sent to the collector and it was correctly associated with the trace.In our actual setup, we are running a node express application, where we use the NodeSDK functions to auto-instructment the application.
Example Collector Config:
Run locally using:
docker run -p 4318:4318 -v $(pwd)/config.yaml:/etc/otelcol-contrib/config.yaml otel/opentelemetry-collector-contrib:0.79.0
OpenTelemetry Setup Code
package.json
Relevant log output
No response
The text was updated successfully, but these errors were encountered: