Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add semantic conventions for HTTP metrics #739
Add semantic conventions for HTTP metrics #739
Changes from 17 commits
34eb0ba
18a3e67
028d345
6f0e55d
d5d15cc
09116fc
14c0a98
b3e8bf2
7e0c306
4d2ec7f
b87fcb8
e2ce1b3
952d1ae
c27d66d
7b59ac0
1ba7a15
bdcbdd5
7de9d45
d420059
655a490
d607daf
da2a2de
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
We don't support integers. Not sure how this should be recorded.
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.
as a string (from the well known integer value).
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.
This conflicts with semantic convention of the equivalently named http.status_code span attribute.
This can be a source of confusion.
I believe we should prohibit using the same attribute name and metric label name but give them slightly different meanings or value sets.
Either change the name of the label here, or change the span attribute name or make sure they both use the same values if the same attribute name and label name is used (i.e. both numbers or both text).
Related to #815
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.
That's a good point. This seems like it'll be a lot bigger discussion and if I decide what it should look like in this PR it'll just bring this PR to a halt. I think this point should involve discussion about standards for this kind of scenario as it will most likely happen again in the future.
Because of that I think the best thing to do here is to leave out the
http.status_code
label for http metric events for now until we have come to a decision on best practices for cases like this and then we can add it in after. That way we can unblock this work and continue into the implementation side of things.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.
Is this useful?
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 am not a fan of status_text / reason phrase myself. It is Optional, so I let it lie.
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.
https://tools.ietf.org/html/rfc7231#section-6.1 says that
Not that I have seen this actually happening but it is a possibility. If source start sending different reason phrase for the same status code that would arguably make the status text less useful since aggregations would be difficult/impossible to do.
Since we already have
http.status_code
perhaps just drop this label?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.
Ugh. I highly dislike dealing with reason phrases.
I can see an argument for leaving it in. I have interacted with a REST service that encoded important stuff in the reason phrase (like the difference between a 404 caused by a route that doesn't exist and a 404 because the requested object doesn't exist).
I vote we leave it in. If we do, it will likely result in all HTTP client instrumentation including it. I guess this is good because in the case of meaningful reason codes, it will be possible to include them on the final metric events, and the user can facet or filter on them in the UI.
And in the general case, this label doesn't add any more cardinality (though it does add a few more bytes per instrument).
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.
Is "flavor" the right term or "version"?
Also, I am not sure "SPDY" or "QUIC" belong to the same set.
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 suggest copying the description verbatim from https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/span-general.md#general-network-connection-attributes and also link to them to avoid any subtle differences that may be introduced here. Even better don't have any description here, only link to that document.
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.
See also #739 (comment)
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.
@justinfoote will propose lifting the semantic conventions out of the
trace
folder, as they are not specific to tracing in a meaningful way that prevents their use in other areas.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.
(We would prefer to merge this and then refactor.)
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.
7de9d45 until that the refactor happens
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.
As @jmacd mentioned: #855