Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion java/iot3/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {
}

group 'com.orange.iot3core'
version '0.2.0'
version '0.2.1-dev'

repositories {
// Use Maven Central for resolving dependencies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,8 @@ public void publishMessage(String topic, String message, boolean retained, int q
span.setAttribute(AttributeKey.stringKey("iot3.core.mqtt.topic"), topic);
span.setAttribute(AttributeKey.stringKey("iot3.core.mqtt.payload_size"),
String.valueOf(message.length()));
if(retained)
span.setAttribute(AttributeKey.booleanKey("iot3.core.mqtt.retain"), true);
span.setAttribute(AttributeKey.stringKey("iot3.core.sdk_language"), "java");

// Inject the trace context into a map
Expand Down Expand Up @@ -385,6 +387,8 @@ public String get(Map<String, String> carrier, String key) {
publish.getTopic().toString());
receivedSpan.setAttribute(AttributeKey.stringKey("iot3.core.mqtt.payload_size"),
String.valueOf(message.length()));
if(publish.isRetain())
receivedSpan.setAttribute(AttributeKey.booleanKey("iot3.core.mqtt.retain"), true);
receivedSpan.setAttribute(AttributeKey.stringKey("iot3.core.sdk_language"), "java");
receivedSpan.end();
}
Expand Down
Loading