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

Change http proxy span pattern #3369

Merged
merged 12 commits into from
Jan 18, 2024
Merged

Change http proxy span pattern #3369

merged 12 commits into from
Jan 18, 2024

Conversation

TonyCTHsu
Copy link
Contributor

@TonyCTHsu TonyCTHsu commented Jan 8, 2024

2.0 Upgrade Guide notes

🚨 Breaking changes:

The request_queuing option on rack/rails must be boolean. Change your configuration from

Datadog.configure do |c|
  c.tracing.instrument :rack, request_queuing: :include_request
  # or 
  c.tracing.instrument :rack, request_queuing: :exclude_request
end

To

Datadog.configure do |c|
  c.tracing.instrument :rack, request_queuing: true
end

With request_queuing enabled, the behaviour changes from 1 span to 2 spans. The original http_server.queue span rename to http.proxy.request, with an additional measured span http.proxy.queue span representing the time spent in a load balancer queue before reaching application. For example:

From

Screenshot 2024-01-08 at 14 27 09

To

Screenshot 2024-01-08 at 14 24 29

🚨 Migration help

Changing the name of the top-level span (http_server.queue -> http.proxy.request) would break a lot of stuff (monitors, dashboards, notebooks). The following snippet rename the top-level span back to help migration.

Datadog::Tracing.before_flush(
  Datadog::Tracing::Pipeline::SpanProcessor.new do |span|
    if span.name == 'http.proxy.request'
      span.name = 'http_server.queue'
    end
  end
)

@github-actions github-actions bot added integrations Involves tracing integrations tracing labels Jan 8, 2024
@TonyCTHsu TonyCTHsu marked this pull request as ready for review January 8, 2024 15:20
@TonyCTHsu TonyCTHsu requested a review from a team as a code owner January 8, 2024 15:20
@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (dd655fb) 98.08% compared to head (fedaf89) 98.08%.
Report is 14 commits behind head on 2.0.

Files Patch % Lines
lib/datadog/tracing/contrib/rack/middlewares.rb 94.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              2.0    #3369      +/-   ##
==========================================
- Coverage   98.08%   98.08%   -0.01%     
==========================================
  Files        1250     1252       +2     
  Lines       72360    72301      -59     
  Branches     3394     3390       -4     
==========================================
- Hits        70975    70916      -59     
  Misses       1385     1385              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TonyCTHsu TonyCTHsu requested a review from a team as a code owner January 10, 2024 13:51
@TonyCTHsu TonyCTHsu requested a review from a team as a code owner January 10, 2024 15:01
@TonyCTHsu TonyCTHsu merged commit 760bd20 into 2.0 Jan 18, 2024
151 checks passed
@TonyCTHsu TonyCTHsu deleted the tonycthsu/new-proxy-span branch January 18, 2024 10:39
@TonyCTHsu TonyCTHsu added this to the 2.0 milestone Feb 20, 2024
@ivoanjo ivoanjo added the 2.0 label Mar 14, 2024
@TonyCTHsu TonyCTHsu modified the milestones: 2.0, 2.0.0.beta1 Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0 integrations Involves tracing integrations tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants