Skip to content

Trace payload/message size in semantic convention is inconsistent #1053

@alexvanboxel

Description

@alexvanboxel

What are you trying to achieve?

Consistency should exist between the naming of payload/message size attribute names. Currently, we have a mix of how the name is constructed over 3 different protocols. HTTP has measure-name(length)(compressed) convention, gRPC has message.un/compressedmeasure_name(size) and message systems have message.measure-name(size)_unit(bytes). Here you have the complete list:

HTTP (attribute on a span):

  • http.request_content_length
  • http.request_content_length_uncompressed
  • http.response_content_length
  • http.response_content_length_uncompressed

gRPC (attribute on link in a stream)

  • message.compressed_size
  • message.uncompressed_size

Messaging system (attribute on a span):

  • messaging.message_payload_size_bytes
  • messaging.message_payload_compressed_size_bytes

What did you expect to see?

Although this doesn't strictly violates the spec (although message in gRPC is borderline), we should seek consistency in the naming of measures. I would have expected something more like this:

HTTP (keeping this as this is the most established)

  • http.request_content_length
  • http.request_content_length_uncompressed
  • http.response_content_length
  • http.response_content_length_uncompressed

gRPC and messaging:

  • messaging.payload_size
  • messaging.payload_size_uncompressed

changes for message: joined RPC and messaging and:

  • Removed unit (bytes)
  • Changed compressed to uncompressed to align with HTTP
  • Removed message from message_payload_size

I think it would be wise too add a note in the attributes naming convention some guidelines for messages, like:

  • not adding the unit (bytes, mm, ...) in the attribute name

Metadata

Metadata

Assignees

Labels

area:semantic-conventionsRelated to semantic conventionspriority:p3Lowest priority levelrelease:allowed-for-gaEditorial changes that can still be added before GA since they don't require action by SIGsspec:traceRelated to the specification/trace directory

Type

No type

Projects

Status

V1 - Stable Semantics

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions