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 OpenTracing test flakiness #2867

Merged
merged 1 commit into from
Oct 1, 2024
Merged

Conversation

iamluc
Copy link
Contributor

@iamluc iamluc commented Oct 1, 2024

Description

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

$span->setTag('http.method', $_SERVER['REQUEST_METHOD']);
$span->finish();
} finally {
\dd_trace_internal_fn("finalize_telemetry");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Calling finalize_telemetry manually causes the metrics (like spans_created) to be sent twice.
Once with service_name as service name, the other with index.php

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think back in the old times finalize_telemetry was final :-) (But I think that matters no longer.)


$metrics = [];
foreach ($metricRequests[0]['payload']['series'] as $serie) {
$metrics[$serie['metric']][] = $serie;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We also receive other metrics (like logs_created), that's why we group them

@codecov-commenter
Copy link

codecov-commenter commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.97%. Comparing base (f4b4015) to head (457016c).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2867      +/-   ##
============================================
+ Coverage     78.41%   80.97%   +2.56%     
  Complexity     2526     2526              
============================================
  Files           173      146      -27     
  Lines         18713    14683    -4030     
  Branches        976        0     -976     
============================================
- Hits          14673    11889    -2784     
+ Misses         3503     2794     -709     
+ Partials        537        0     -537     
Flag Coverage Δ
appsec-extension ?
tracer-extension 78.26% <ø> (ø)
tracer-php 82.10% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 27 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f4b4015...457016c. Read the comment docs.

@iamluc iamluc marked this pull request as ready for review October 1, 2024 09:22
@iamluc iamluc requested a review from a team as a code owner October 1, 2024 09:22
@iamluc iamluc merged commit b8fde57 into master Oct 1, 2024
647 checks passed
@iamluc iamluc deleted the luc/fix-opentracing-test-flakiness branch October 1, 2024 11:29
@github-actions github-actions bot added this to the 1.4.0 milestone Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants