Cloud-native architectures, particularly microservices, have become a common paradigm in modern software development, requiring high observability for reliable maintenance and analysis of distributed systems. A key aspect is distributed tracing, which provides transparency across service boundaries. This requires consistent propagation of context information along communication paths. This thesis addresses the post hoc instrumentation of communication libraries that lack native support for telemetry generation and context propagation, potentially causing gaps in trace capture. Using the .Net-based library MQTTnet as an example, it investigates how the OpenTelemetry standard can be integrated to enable end-to-end traceability. Various instrumentation strategies are implemented within the scope of this work, including white-box and black-box approaches that differ in their level of modification and reusability. The prototype implementation is demonstrated within a practical IoT scenario for a smart replenishment process in logistics, illustrating integration under realistic conditions. The results show that existing libraries without native telemetry support can be effectively instrumented to produce standardized and continuous traces. Key OpenTelemetry concepts such as context propagation and semantic conventions are successfully applied, and the instrumentation approaches are evaluated regarding their advantages and disadvantages. This work thus contributes to improving the observability of distributed systems and provides concrete recommendations for developing reusable instrumentation libraries.
Developing Comprehensive Instrumentation Libraries Using OpenTelemetry for Enhanced Observability
Gruber, M. (Author). 2025
Student thesis: Master's Thesis