Skip to content
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

Merged
merged 5 commits into from
Dec 19, 2023
Merged

Fix analytics.event override #2409

merged 5 commits into from
Dec 19, 2023

Conversation

PROFeNoM
Copy link
Contributor

@PROFeNoM PROFeNoM commented Dec 5, 2023

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 yield 0.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

  • Test coverage seems ok.
  • Appropriate labels assigned.

@PROFeNoM PROFeNoM added this to the 0.95.0 milestone Dec 5, 2023
@PROFeNoM PROFeNoM self-assigned this Dec 5, 2023
@PROFeNoM PROFeNoM requested a review from a team as a code owner December 5, 2023 15:55
@github-actions github-actions bot removed this from the 0.95.0 milestone Dec 5, 2023
@PROFeNoM
Copy link
Contributor Author

PROFeNoM commented Dec 6, 2023

I confirm that the system tests would pass with this change (with respect to the alex/otel-api branch)
image

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) {
Copy link
Collaborator

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

Copy link
Contributor Author

@PROFeNoM PROFeNoM Dec 13, 2023

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.

Copy link
Contributor Author

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 😃

Copy link
Collaborator

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!

@PROFeNoM PROFeNoM force-pushed the alex/fix/otel-analytics-event branch from 4bdc524 to 9b00079 Compare December 15, 2023 14:38
Copy link
Collaborator

@pierotibou pierotibou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@PROFeNoM PROFeNoM merged commit f8f6d29 into master Dec 19, 2023
568 of 569 checks passed
@PROFeNoM PROFeNoM deleted the alex/fix/otel-analytics-event branch December 19, 2023 08:12
@PROFeNoM PROFeNoM added this to the 0.96.0 milestone Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants