MATLAB Interface to OpenTelemetry
MATLAB® interface to OpenTelemetry™, based on the OpenTelemetry Specification. OpenTelemetry is an observability framework for creating and managing telemetry data, such as traces, metrics, and logs. This data can then be sent to an observability back-end for monitoring, alerts, and analysis.
Status
- Currently only tracing is supported. Metrics and logs will be in the future.
- This package is supported and has been tested on Windows®, Linux®, and macOS.
MathWorks Products (https://www.mathworks.com)
Requires MATLAB release R2022b or newer
3rd Party Products:
Installation
Installation instructions
Before proceeding, ensure that the below products are installed:
- Download, Build and install OpenTelemetry MATLAB
cd <opentelemetry-matlab-root>
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=<opentelemetry-matlab-installdir>
cmake --build build --config Release --target install
- Download OpenTelemetry Collector. You can just obtain a pre-built binary for your platform.
Getting Started
- Start OpenTelemetry Collector
otelcol --config <otelcol-config-yaml>
- Start MATLAB
- Add the OpenTelemetry MATLAB install directories to your MATLAB path
>> addpath <OpenTelemetry MATLAB installdir>
Examples
- Create a default tracer provider and save it.
>> p = opentelemetry.sdk.trace.TracerProvider();
>> setTracerProvider(p);
- Start a span
>> tr = opentelemetry.trace.getTracer("First Tracer");
>> sp = tr.startSpan("First Span");
- End the span
>> sp.endSpan();
- If your collector is configured to display the data, you should see your span displayed.
For more examples, see the "examples" folder.
Help
To view documentation of individual function, type "help <function_name>". For example,
>> help opentelemetry.sdk.trace.TracerProvider
License
The license is available in the License file within this repository
Community Support
Copyright 2023 The MathWorks, Inc.
Cite As
Duncan Po (2023). OpenTelemetry-Matlab (https://github.com/mathworks/OpenTelemetry-Matlab/releases/tag/v1.4.0), GitHub. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
api/baggage/+opentelemetry/+baggage
api/baggage/+opentelemetry/+baggage/+propagation
api/common/+opentelemetry/+common
api/context/+opentelemetry/+context
api/context/+opentelemetry/+context/+propagation
api/trace/+opentelemetry/+trace
api/trace/+opentelemetry/+trace/+propagation
examples/context_propagation/matlab
examples/trace
examples/webread/matlab
exporters/otlp/+opentelemetry/+exporters/+otlp
sdk/trace/+opentelemetry/+sdk/+trace
test
test/performance
Version | Published | Release Notes | |
---|---|---|---|
1.4.0.0 | See release notes for this release on GitHub: https://github.com/mathworks/OpenTelemetry-Matlab/releases/tag/v1.4.0 |
||
1.3.0.0 | See release notes for this release on GitHub: https://github.com/mathworks/OpenTelemetry-Matlab/releases/tag/v1.3.0 |
||
1.2.0.0 | See release notes for this release on GitHub: https://github.com/mathworks/OpenTelemetry-Matlab/releases/tag/v1.2.0 |
||
1.1.0.0 | See release notes for this release on GitHub: https://github.com/mathworks/OpenTelemetry-Matlab/releases/tag/v1.1.0 |
||
1.0.1.0 | See release notes for this release on GitHub: https://github.com/mathworks/OpenTelemetry-Matlab/releases/tag/v1.0.1 |
||
1.0 |