open-telemetry / semantic-conventions

Defines standards for generating consistent, accessible telemetry across a variety of domains
Apache License 2.0
266 stars 169 forks source link

Metric definitions for message/event networking (broker metrics) #120

Open kmcclellan opened 1 year ago

kmcclellan commented 1 year ago

I noticed there are semantic definitions for Kafka metrics, many of which could apply to other technologies that send messages/events over a network (AMQP, for example).

It seems valuable to define these metrics in way that is agnostic to technology/protocol, similar to the RPC metrics (in which there exists a similar overlap with HTTP).

joaopgrassi commented 1 year ago

Hi @kmcclellan the messaging working group is tasked to work on "general" messaging metrics as part of the stabilization work. @lmolkova opened a draft PR with some ideas https://github.com/open-telemetry/semantic-conventions/pull/163. Sorry this slipped and wasn't replied earlier. Let us know if you have other ideas and feel free to leave comments on the PR or join our SIG meetings.

pyohannes commented 1 year ago

For a first stable version of messaging semantic conventions we will focus on client-side instrumentation (producer and consumer) of traces and metrics.

Broker instrumentation is something that will be tackled post-v1.

kmcclellan commented 1 year ago

Makes sense, esp. given not all messaging protocols involve a "broker" role. Generally it might make sense to avoid Kafka-specific language for these semantics. "Publisher" and "subscriber" might serve better to that end (as opposed to "producer"/"consumer"). "Message" probably serves better than "event."

"Client" too may be worthy of avoidance, since pub/sub is quite a different paradigm than client/server (data flows in one direction instead of a bidirectional request/response).

On second thought, I better just take a look at the PR ðŸ¤