Closed dmehala closed 3 months ago
Flyby comment. Maybe I should disable notifications about these repositories. :)
This change could cause problems for users who depend on those values currently and then upgrade.
Consider adding new variables for the hex representation. You probably already thought of that.
Maximal solution:
$datadog_trace_id_hex
is the 128-bit (!) trace ID in hexadecimal.$datadog_span_id_hex
is the 64-bit span ID in hexadecimal.$datadog_trace_id_dec
is the 64-bit (!) trace ID in decimal.$datadog_span_id_dec
is the 64-bit span ID in decimal.$datadog_trace_id
is $datadog_trace_id_dec
.$datadog_span_id
is $datadog_span_id_dec
.The tradeoff is between "backward compatibility" and "OpenTelemetry is the way." If 128-bit hex IDs really are where Datadog is going, then consider the above but with (5) and (6) changed to prefer hex, so that then you can print a big warning on the next release: "Trace ID and span ID variables are now hexadecimal! Use $foo_dec for the old behavior!"
Bear in mind also that these variables are baked into the default log format, so changing the meaning of the variables will affect the access logs of users who never typed the variable name.
Hey @dgoffredo ! Thanks for your input.
I did considered new variables, but the more I reflect on it, the less certain I am that we actually need them. My thinking is $datadog_X_id
doesn't serve much purpose for customers beyond log correlation or logging - though I could be wrong.
In the past, when I made a breaking change without notifying our customers, we received some complaints. So, I can almost hear Caleb's voice saying something along the line "you should warn first any future breaking change". Since you're suggesting the same, it's probably wise to follow that approach.
Thanks again!
Hm, I see your point.
I will define $datadog_x_hex
and log a warning that the default behaviour of $datadog_x
will change in the N+1 release.
Thank you for your feedback @pablomartinezbernardo .
Attention: Patch coverage is 50.00000%
with 4 lines
in your changes missing coverage. Please review.
Project coverage is 66.95%. Comparing base (
64a3c93
) to head (fe5d408
). Report is 1 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
src/tracing_library.cpp | 20.00% | 2 Missing and 2 partials :warning: |
Changes:
Resolves #102