Skip to content

Java/IoT3Core: Open telemetry improvements - #606

Merged
mathieu1fb merged 4 commits into
Orange-OpenSource:masterfrom
mathieu1fb:open-telemetry-improvements
Oct 5, 2026
Merged

mathieu1fb merged 4 commits into
Orange-OpenSource:masterfrom
mathieu1fb:open-telemetry-improvements

Conversation

@mathieu1fb

Copy link
Copy Markdown
Collaborator

What's new

  • Open Telemetry SDK has been bumped to v1.62.0 (from v1.40 which had some known vulnerabilies)
  • OkHttp has been bumped as well to v5.3.2 (from v4.12.0) to align with opentelemetry-exporter's version
  • Reliance on GlobalOpenTelemetry propagators has been removed, with the local openTelemetryClient now exposing its own propagators
  • Unit tests for IoT3Core OpenTelemetryClient and its usage by MqttClient

Close #605

What to do

Review code and run all IoT3Core unit tests.

…5.3.2

BootstrapHelperTest have been updated to use mockwebserver3 for OkHttp v5 compatibility.

Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
- OpenTelemetryClientTest for standalone OTLP tests
- MqttClientOpenTelemetryTest for validation of MqttClient's OTLP integration behavior

Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
…metry singleton causing issue with IoT3Core restart

OpenTelemetryClient called GlobalOpenTelemetry.set()/resetForTest(), a process-wide singleton that throws IllegalStateException if set twice. Since nothing actually required the global instance (propagators were only ever read by MqttClient, which already holds a direct reference to the OpenTelemetryClient instance), this made stopping/restarting the SDK fail.

Fix: keep propagators as instance state on OpenTelemetryClient (new getPropagators() accessor) and have MqttClient use it directly instead of GlobalOpenTelemetry, removing all reliance on global static state.
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
@mathieu1fb
mathieu1fb requested a review from fredOG-2A1 October 5, 2026 09:45
@mathieu1fb mathieu1fb self-assigned this Oct 5, 2026
@mathieu1fb mathieu1fb added the Java label Oct 5, 2026
@mathieu1fb mathieu1fb added this to Kanban Oct 5, 2026

@fredOG-2A1 fredOG-2A1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review done.
All Junit tests ran without any errors .

Image

@mathieu1fb
mathieu1fb merged commit a1f1306 into Orange-OpenSource:master Oct 5, 2026
123 checks passed
@mathieu1fb
mathieu1fb deleted the open-telemetry-improvements branch October 5, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Java/IoT3Core: remove reliance on GlobalOpenTelemetry instance

2 participants