opencensus-python
opencensus-python copied to clipboard
Allow DatadogExporter to be configured to truncate trace_ids similar to OpenTelemetry
Is your feature request related to a problem? When using OpenTelemetry and OpenCensus libraries for tracing, they both convert the 128 bit trace IDs in different ways. This prevents traces from being consistent across multiple services.
Describe the solution you'd like.
I'd like to be able to configure the DatadogExporter
to translate and truncate the trace ID into a 64 bit integer by doing the following:
int(trace_id, 16) & ((1 << 64) - 1)
Describe alternatives you've considered.
At the moment, I've forked the source of the DatadogExporter
to perform the ID conversion. I'm not aware of any other solutions to this problem but am open to ideas.
Would this be something that you all would be open to accepting a pull request for?