Merged
Conversation
Generics management where a pain in some cases when you just don't have another context to link to the span you want, as the call would require to specify the optional type you pass (e.g. `None::<MyType<P,A,I,N>>') Remove the optional parameter from the `get_span` function and add another one `get_linked_span` which as a non optional argument where the context can be extracted from Signed-off-by: Nicolas Buffon <nicolas.buffon@orange.com>
Signed-off-by: Nicolas Buffon <nicolas.buffon@orange.com>
Signed-off-by: Nicolas Buffon <nicolas.buffon@orange.com>
Signed-off-by: Nicolas Buffon <nicolas.buffon@orange.com>
262ac32 to
5751495
Compare
Add the OTLP W3C context as user property in MQTT message on publish Signed-off-by: Nicolas Buffon <nicolas.buffon@orange.com>
5751495 to
bb116dd
Compare
tigroo
approved these changes
Oct 29, 2024
Collaborator
tigroo
left a comment
There was a problem hiding this comment.
A minor comment.
No test.
rust/src/transport/telemetry.rs
Outdated
| pub(crate) fn get_reception_mqtt_span(publish: &Publish) -> BoxedSpan { | ||
| let tracer = global::tracer("iot3.core"); | ||
|
|
||
| let topic = from_utf8(&publish.topic.to_vec()) |
Collaborator
There was a problem hiding this comment.
let topic = from_utf8(&publish.topic)
Member
ymorin-orange
left a comment
There was a problem hiding this comment.
- Tests all working as described.
One comment, though: copycat reports several informational messages that look like errors:
INFO [libits::client::application::pipeline] Cannot trace exchange, missing gateway component name in node configuration
Signed-off-by: Nicolas Buffon <nicolas.buffon@orange.com>
Message reception and emission are automatically traced by the SDK if the feature is enabled This can now be tested using the copycat example by initializing the tracer in the example Signed-off-by: Nicolas Buffon <nicolas.buffon@orange.com>
bb116dd to
20f183c
Compare
Member
Author
This is because of the old KPI logging system which requires the Information message to be received once first, and test.mosquitto.org obviously does not send one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's new
Closes #124
How to test
Start a Jaeger/OTLP collector image
Create the test script
(or download it as txt test_copycat.txt)
Listen to MQTT messages with MQTTv5 properties
Edit the
examples/config.inifile to fill the telemetry section with the following contentStart the copycat example with the telemetry feature
Launch the test script
=> Several reception must be logged
=> One message publication must be logged
The published message should be carrying the W3C context (logged by mosquitto_sub command)
The test scripts did prompt asking for a trace parent, answer it using the published message's one
Check the spans content on the local jaeger interface
=> You must see 8 traces
=> The 7th (the second most recent) must have a link to another span