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: root span name in Slim V4 #3020

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

PROFeNoM
Copy link
Contributor

@PROFeNoM PROFeNoM commented Jan 7, 2025

Description

I couldn't find a reason for the root span name to differ in Slim 3 compared to Slim 4. Furthermore, setting it to slim.request is consistent with all other integrations.

This behavior was identified in the linked escalation.

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@PROFeNoM PROFeNoM self-assigned this Jan 7, 2025
@PROFeNoM PROFeNoM force-pushed the alex/APMS-14231_slim-4-root-span-name branch from c76e61b to 51f7631 Compare January 7, 2025 10:32
@codecov-commenter
Copy link

codecov-commenter commented Jan 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.80%. Comparing base (906cbc5) to head (51f7631).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #3020   +/-   ##
=========================================
  Coverage     74.80%   74.80%           
  Complexity     2781     2781           
=========================================
  Files           112      112           
  Lines         11017    11017           
=========================================
  Hits           8241     8241           
  Misses         2776     2776           
Flag Coverage Δ
tracer-php 74.80% <100.00%> (ø)

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

Files with missing lines Coverage Δ
src/DDTrace/Integrations/Slim/SlimIntegration.php 96.80% <100.00%> (ø)

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 906cbc5...51f7631. Read the comment docs.

@PROFeNoM PROFeNoM marked this pull request as ready for review January 7, 2025 10:48
@PROFeNoM PROFeNoM requested review from a team as code owners January 7, 2025 10:48
Copy link
Collaborator

@bwoebi bwoebi left a comment

Choose a reason for hiding this comment

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

Looks simple and correct, thanks :-)

@PROFeNoM PROFeNoM merged commit 7d37019 into master Jan 7, 2025
671 of 698 checks passed
@PROFeNoM PROFeNoM deleted the alex/APMS-14231_slim-4-root-span-name branch January 7, 2025 13:51
@github-actions github-actions bot added this to the 1.6.0 milestone Jan 7, 2025
@@ -34,6 +34,7 @@ function ($app) use ($integration, $appName) {
// Overwrite root span info
$rootSpan = \DDTrace\root_span();
$integration->addTraceAnalyticsIfEnabled($rootSpan);
$rootSpan->name = 'slim.request';
Copy link

@mrtus mrtus Jan 9, 2025

Choose a reason for hiding this comment

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

Q: Can this be overwritten?

A lot of our notebooks & dashboarding are configured on web.request, so it would be a shame if everything needs to be updated again.

Kinda would consider this a breaking change, especially since also monitors and such probably rely on this value.

Copy link

Choose a reason for hiding this comment

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

Tagging @PROFeNoM and @bwoebi for visibility

Or if you require me to create an issue by all means I can do that :D

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can easily overwrite it with \DDTrace\root_span()->name = 'web.request'; at the end of your entrypoint for example.

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