-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix analytics.event override #2409
Conversation
I confirm that the system tests would pass with this change (with respect to the alex/otel-api branch) |
ext/serializer.c
Outdated
@@ -1202,6 +1202,11 @@ void ddtrace_shutdown_span_sampling_limiter(void) { | |||
zend_hash_destroy(&dd_span_sampling_limiters); | |||
} | |||
|
|||
static zend_always_inline double ddtrace_convert_string_to_double(zend_string *str) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no possibility for that use case to be something else than true
? I ask because we do something more comprehensive in .NET
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. I re-read the RFC, and it must match the same behavior as strconv.ParseBool. I'll change this as soon as I can.
Note: It's not tested in the system tests right now. I will add them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a system tests PR. Let's wait on it to assess the correct behavior to go with 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the thorough follow up!
4bdc524
to
9b00079
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Description
A system-test testing the behavior of
analytics.event
tag override was added with DataDog/system-tests#1818. The current implementation would fail :)This PR simply explicitly checks for 'true' (not case sensitive) to return
1.0
, and anything else would yield0.0
I set it as
do-not-merge
as I need the pipeline to finish to test it properly, but the local tests otherwise pass.Reviewer checklist