-
Notifications
You must be signed in to change notification settings - Fork 55
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
Sort attribute tables by requirement level and attribute name #260
Conversation
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.
LGTM!
(please add a changelog entry)
semantic-conventions/src/opentelemetry/semconv/model/semantic_convention.py
Outdated
Show resolved
Hide resolved
f54dde4
to
c0a006b
Compare
a23a9aa
to
3e64191
Compare
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. |
@lmolkova Looks good to me. |
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.duration
attributes:http.request.method
GET
;POST
;HEAD
url.scheme
http
;https
error.type
timeout
;java.net.UnknownHostException
;server_certificate_invalid
;500
http.response.status_code
200
http.route
/users/:userID?
;{controller}/{action}/{id?}
network.protocol.name
http
;spdy
network.protocol.version
network.protocol.name
. [7]1.0
;1.1
;2
;3
server.address
example.com
;10.1.2.80
;/tmp/my.sock
server.port
80
;8080
;443