-
Notifications
You must be signed in to change notification settings - Fork 439
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
contrib/envoyproxy: fix resource name #3047
base: main
Are you sure you want to change the base?
Conversation
2a5755a
to
931d9a0
Compare
Datadog ReportBranch report: ✅ 0 Failed, 5112 Passed, 70 Skipped, 2m 39.33s Total Time |
BenchmarksBenchmark execution time: 2024-12-19 17:35:07 Comparing candidate commit d446c41 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 0 unstable metrics. |
@@ -204,6 +205,7 @@ func processRequestHeaders(ctx context.Context, req *envoyextproc.ProcessingRequ | |||
var blocked bool | |||
fakeResponseWriter := newFakeResponseWriter() | |||
wrappedResponseWriter, request, afterHandle, blocked := httptrace.BeforeHandle(&httptrace.ServeConfig{ | |||
Resource: request.Method + " " + path.Clean(request.URL.Path), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we path.Clean
here? shouldn't we just put the original data that was in the request?
also something we are trying to do in other http server integrations is to use the low cardinality http.route
(see details here) for the resource name. Would it be possible to have this here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a path.Clean here like it's done in the mux.Handler() to get the route. And in the handler, it's calling cleanPath() which is doing a path.Clean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, we don't have the http.route
information at the proxy level. Only the raw path is available.
What does this PR do?
Fix the ressource.name from the span: change from
operation_name
tomethod + path
.Motivation
More clear resources name in the UI.
Reviewer's Checklist
v2-dev
branch and reviewed by @DataDog/apm-go.Unsure? Have a question? Request a review!