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 datadog incorrect resource names added semconv attribute http.route #5420

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -318,13 +318,13 @@ func (c *httpConv) ServerRequest(server string, req *http.Request) []attribute.K
net.protocol.name string Note: not set if the value is "http".
net.protocol.version string
http.target string Note: doesn't include the query parameter.
http.route string Note: doesn't include the query parameter.
*/

/* The following semantic conventions are not returned:
http.status_code This requires the response.
http.request_content_length This requires the len() of body, which can mutate it.
http.response_content_length This requires the response.
http.route This is not available.
net.sock.peer.name This would require a DNS lookup.
net.sock.host.addr The request doesn't have access to the underlying socket.
net.sock.host.port The request doesn't have access to the underlying socket.
Expand Down Expand Up @@ -407,6 +407,7 @@ func (c *httpConv) ServerRequest(server string, req *http.Request) []attribute.K

if target != "" {
attrs = append(attrs, c.HTTPTargetKey.String(target))
attrs = append(attrs, c.HTTPTargetKey.String(target))
Copy link
Member

Choose a reason for hiding this comment

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

This is using HTTPTargetKey, so it's setting the http.target attribute twice, not http.route.

}

if protoName != "" && protoName != "http" {
Expand Down