Skip to content

Conversation

@y9v
Copy link
Member

@y9v y9v commented Oct 23, 2025

What does this PR do?
This PR adds http.endpoint tag for requests for all rack applications (nested and standalone).

Motivation:
We want to be able to infer routes for rack applications for which we can't get the exact route. This new http.endpoint tag will use http.route tag value whenever it is available, and will infer the route from the request path when the route is not available.

Change log entry
Yes. Tracing: Add http.endpoint tag which contains the route whenever the routing information is available, and falls back to route inferred from the request path.

Additional Notes:
APPSEC-58489

How to test the change?
CI and manual testing

@y9v y9v self-assigned this Oct 23, 2025
@github-actions github-actions bot added integrations Involves tracing integrations tracing labels Oct 23, 2025
@github-actions
Copy link

github-actions bot commented Oct 23, 2025

Typing analysis

Ignored files

This PR introduces 1 ignored file. It decreases the percentage of typed files from 35.91% to 35.87% (-0.04%).

Ignored files (+1-0)Introduced:
lib/datadog/tracing/contrib/rack/route_from_path_inference.rb

@pr-commenter
Copy link

pr-commenter bot commented Oct 23, 2025

Benchmarks

Benchmark execution time: 2025-10-27 14:05:57

Comparing candidate commit d43e6b4 in PR branch add-http-endpoint-tag-when-route-is-missing with baseline commit 05d35a2 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 44 metrics, 2 unstable metrics.

@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Oct 23, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage
Patch Coverage: 99.07%
Total Coverage: 98.43% (-0.15%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 394e169 | Docs | Was this helpful? Give us feedback!

@github-actions github-actions bot added the core Involves Datadog core libraries label Oct 23, 2025
@y9v y9v changed the title Add a module that infers route from request path Add http.endpoint tag Oct 23, 2025
@y9v y9v marked this pull request as ready for review October 24, 2025 13:18
@y9v y9v requested review from a team as code owners October 24, 2025 13:18
@y9v y9v requested a review from vpellan October 24, 2025 13:18
@y9v y9v marked this pull request as draft October 24, 2025 13:18
@y9v y9v force-pushed the add-http-endpoint-tag-when-route-is-missing branch from 688200d to 59ee60b Compare October 24, 2025 15:24
@y9v y9v force-pushed the add-http-endpoint-tag-when-route-is-missing branch from 478029d to 761ce85 Compare October 27, 2025 11:39
@y9v y9v marked this pull request as ready for review October 27, 2025 12:16
Copy link
Member

@Strech Strech left a comment

Choose a reason for hiding this comment

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

LGTM, I think there are some discrepancy between code and typespec. I've left few suggestions for route inferring, but nothing blocking. Well done!

Copy link
Contributor

@vpellan vpellan left a comment

Choose a reason for hiding this comment

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

LGTM! (Comments are non-blockers)

@y9v y9v merged commit 5a1bda1 into master Oct 28, 2025
557 checks passed
@y9v y9v deleted the add-http-endpoint-tag-when-route-is-missing branch October 28, 2025 16:03
@github-actions github-actions bot added this to the 2.23.0 milestone Oct 28, 2025
@Strech Strech mentioned this pull request Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Involves Datadog core libraries integrations Involves tracing integrations tracing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants