Sort attribute tables by requirement level and attribute name#260
Merged
Conversation
3 tasks
lmolkova
approved these changes
Feb 7, 2024
Member
lmolkova
left a comment
There was a problem hiding this comment.
LGTM!
(please add a changelog entry)
f54dde4 to
c0a006b
Compare
joaopgrassi
approved these changes
Mar 13, 2024
a23a9aa to
3e64191
Compare
Member
|
There was a bunch of new merge conflicts - I resolved them. Keeping it open a bit longer in case anyone wants to take a look. |
Contributor
Author
@lmolkova Looks good to me. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes open-telemetry/semantic-conventions#614
When consulting semantic conventions and the documentation generated from it, especially for metrics, I often find myself asking which attributes I can rely on to be present (which ones are "required"). For me, that's a much more common use case than looking for a single attribute by name.
This changes the ordering of generated attribute tables to order by requirement level: required attributes first, then conditionally required ones, recommended ones, and opt-ins. Especially for metrics, looking for required attributes is a more common use case than looking attributes up by name.
Example
That's how this would look for
http.server.request.durationattributes:http.request.methodGET;POST;HEADurl.schemehttp;httpserror.typetimeout;java.net.UnknownHostException;server_certificate_invalid;500http.response.status_code200http.route/users/:userID?;{controller}/{action}/{id?}network.protocol.namehttp;spdynetwork.protocol.versionnetwork.protocol.name. [7]1.0;1.1;2;3server.addressexample.com;10.1.2.80;/tmp/my.sockserver.port80;8080;443