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

Semantic conventions for request / response size #640

Closed
anuraaga opened this issue Jun 8, 2020 · 1 comment · Fixed by #641
Closed

Semantic conventions for request / response size #640

anuraaga opened this issue Jun 8, 2020 · 1 comment · Fixed by #641
Labels
area:semantic-conventions Related to semantic conventions spec:trace Related to the specification/trace directory

Comments

@anuraaga
Copy link
Contributor

anuraaga commented Jun 8, 2020

I think it's common for spans to contain attributes for the size of a request or response. Would it make sense to add these conventions for HTTP which mark the number of bytes in a request or response body (0 if there is no body, headers wouldn't be included)?

@arminru arminru added the area:semantic-conventions Related to semantic conventions label Jun 8, 2020
@arminru
Copy link
Member

arminru commented Jun 8, 2020

Sure, feel free to make a PR adding these to the spec.
Personally I think it's better to have more (optional) attributes defined than too few, because the consequence of missing attributes will be that users/instrumenters have to come up with their own, which makes it harder for backends to analyze them. It's better to align key names and semantics right from the start before there are dozens of different names used in different instrumentations, with same or slightly different semantics.

I wouldn't make them required, however. In some cases, HTTP requests are just passing through services without having their content decoded and processed, so the body size might be dispensable for them (even though just getting the size should be trivial).
We also have optional attributes defined for message sizes, so you could have a look at these to stay consistent:

| `messaging.message_payload_size_bytes` | The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. | No |
| `messaging.message_payload_compressed_size_bytes` | The compressed size of the message payload in bytes. | No |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:semantic-conventions Related to semantic conventions spec:trace Related to the specification/trace directory
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants