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
Opentelemetry support for tracing request #2888
Comments
Not sure, what you are looking for. Taking a look especially into the referenced document (https://w3c.github.io/trace-context-mqtt/ there seems to be a well defined way how the required information got propagated over an MQTT Broker (at least for MQTTv5). As Mosquitto does support Custom properties the information should be propagated through the Mosquitto (if the publisher add the custom properties). If you want the broker to emit trace messages bout the processing of messages having these custom properties attached the easiest way would be to implement a plugin emitting these trace messages. Register for the MOSQ_EVT_MESSAGE_IN and MOSQ_EVT_MESSAGE_OUT event should be sufficient to inspect the all incoming/outgoing messages for the properties defined in the spec and emit a trace info. |
Oh, thanks a lot. So basicaly if the MQTT client already supports opentelemetry and is using the MQTTv5 he will add the needed custom properties and mosquitto will just propage the custom properties to subscribers. I did not realize that. I will test functionality for tracing the request. Thanks a lot for the hint. |
Hello everyone,
I was wondering whether it is possible to enable mosquitto MQTT broker to support tracing with open telemetry standard which would bring a lot of benefit for monitoring and tracing request in distributed systems especialy in IoT enviroment and microservices that uses MQTT as communication broker.
Looking at the following standards.
https://opentelemetry.io/
which are using following standards
https://www.w3.org/TR/trace-context/
And specificaly for MQTT https://w3c.github.io/trace-context-mqtt/
There are multiple stuff to implement to completely support the opentelemetry standard but the main one which I am asking is to implement the context propagation mechanism.
https://opentelemetry.io/docs/concepts/signals/traces/#context-propagation
Also on this site I found a nice picture about MQTT and Opentelemetry. https://www.hivemq.com/article/opentelemetry-distributed-tracing-mqtt-messages-iot-observability-apm/
Any feedback whether this is already in backlog?
Thanks a lot for any response. :)
The text was updated successfully, but these errors were encountered: