spandex-project/spandex

BUG: Spandex should encode trace_id/span_ids as strings in Logger metadata

aselder opened this issue · 0 comments

If you look at DataDog documentation for other languages (e.g. Ruby https://docs.datadoghq.com/tracing/connect_logs_and_traces/ruby/), they recommend transmitting the trace_id and span_id as strings in JSON log messages.

DataDog's JSON ingestion is treating those fields at JS Numbers, which are float64s. These do not have enough precision to store all the digits of trace and span ids. The result is logs that don't correlate to APM traces.

See attached pictures.
Screen Shot 2020-11-30 at 9 54 25 AM
Screen Shot 2020-11-30 at 9 54 17 AM

I'll have a PR up in the next couple days.