{"id":19129750,"url":"https://github.com/mathworks/opentelemetry-matlab","last_synced_at":"2025-10-19T09:24:21.128Z","repository":{"id":92436443,"uuid":"593277125","full_name":"mathworks/OpenTelemetry-MATLAB","owner":"mathworks","description":"MATLAB interface to OpenTelemetry","archived":false,"fork":false,"pushed_at":"2025-04-30T13:37:41.000Z","size":1025,"stargazers_count":17,"open_issues_count":11,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-30T14:57:29.844Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathworks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-25T16:37:49.000Z","updated_at":"2025-04-04T04:23:50.000Z","dependencies_parsed_at":"2023-03-11T18:31:17.378Z","dependency_job_id":"9054cb6e-2945-484c-871a-490c3cda33e4","html_url":"https://github.com/mathworks/OpenTelemetry-MATLAB","commit_stats":{"total_commits":188,"total_committers":4,"mean_commits":47.0,"dds":0.2606382978723404,"last_synced_commit":"4a483da6e6cfadad8f416a9fdd11a2e47efcd47c"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2FOpenTelemetry-MATLAB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2FOpenTelemetry-MATLAB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2FOpenTelemetry-MATLAB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2FOpenTelemetry-MATLAB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathworks","download_url":"https://codeload.github.com/mathworks/OpenTelemetry-MATLAB/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252599927,"owners_count":21774498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T06:08:23.968Z","updated_at":"2025-10-19T09:24:21.119Z","avatar_url":"https://github.com/mathworks.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MATLAB Interface to OpenTelemetry\n[![View OpenTelemetry-Matlab on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/130979-opentelemetry-matlab) [![MATLAB](https://github.com/mathworks/OpenTelemetry-Matlab/actions/workflows/build_and_test_full.yml/badge.svg)](https://github.com/mathworks/OpenTelemetry-Matlab/actions/workflows/build_and_test_full.yml)[![codecov](https://codecov.io/github/mathworks/OpenTelemetry-MATLAB/graph/badge.svg?token=VNj6f1LlMG)](https://codecov.io/github/mathworks/OpenTelemetry-MATLAB)\n\nMATLAB\u0026reg; interface to [OpenTelemetry\u0026trade;](https://opentelemetry.io/), based on the [OpenTelemetry Specification](https://opentelemetry.io/docs/specs/otel/). 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. \n\n### Status\n1. Tracing, metrics, and logs are all fully supported and tested on Windows\u0026reg;, Linux\u0026reg;, and macOS.\n2. On Linux, when running MATLAB R2025a or newer releases, the gRPC library used in the gRPC exporter in this package may conflict with the same library in MATLAB, causing MATLAB to crash. To avoid this issue, install otel-matlab-nogrpc.mltbx in [version 1.10.2](https://github.com/mathworks/OpenTelemetry-MATLAB/releases/tag/1.10.2), which excludes the gRPC exporter.\n3. If you are using [version 1.10.2](https://github.com/mathworks/OpenTelemetry-MATLAB/releases/tag/1.10.2) on Linux with MATLAB R2024a or older, you may run into an \"Invalid MEX file\" error due to an incompatible libstdc++ library. Define the environment variable LD_PRELOAD to point to the system libstdc++.so. For example, use the following command in a Bash shell on Ubuntu or Debian Linux.\n```\nexport LD_PRELOAD=\"/lib/x86_64-linux-gnu/libstdc++.so.6\"\n```\n4. OpenTelemetry currently does not support non-ASCII characters. Defining names or attributes with non-ASCII characters will cause the telemetry data to become invalid and fail to export.\n\n### MathWorks Products (https://www.mathworks.com)\n\nRequires MATLAB release R2022b or newer\n- [MATLAB](https://www.mathworks.com/products/matlab.html)\n\n### 3rd Party Products:\n- [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector-releases/releases)\n- [OpenTelemetry C++](https://github.com/open-telemetry/opentelemetry-cpp)\n- [vcpkg C/C++ dependency manager](https://vcpkg.io)\n\n## Installation \nInstallation instructions\n\n### Installing With Toolbox Package\n1. Under \"Assets\" of a release, download the toolbox package .mltbx file.\n2. Start MATLAB.\n3. In the Current Folder browser, navigate to the .mltbx file.\n4. Right click on the .mltbx file and select \"Install\".\n\n### Building From Source\nBefore proceeding, ensure that the below products are installed:\n* [MATLAB](https://www.mathworks.com/products/matlab.html)\n\n1. Download, Build and install OpenTelemetry MATLAB\n```\ncd \u003copentelemetry-matlab-root\u003e\ncmake -S . -B build -DCMAKE_INSTALL_PREFIX=\u003copentelemetry-matlab-installdir\u003e\ncmake --build build --config Release --target install\n\n```\n2. Download [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector-releases/releases). You can just obtain a pre-built binary for your platform.\n\n## Getting Started\n1. Start OpenTelemetry Collector\n```\notelcol --config \u003cotelcol-config-yaml\u003e\n```\n2. Start MATLAB\n3. Add the OpenTelemetry MATLAB install directories to your MATLAB path\n```\n\u003e\u003e addpath \u003cOpenTelemetry MATLAB installdir\u003e\n```\n## Examples\n### Tracing\n1. Create a default tracer provider and save it.\n```\n\u003e\u003e p = opentelemetry.sdk.trace.TracerProvider();\n\u003e\u003e setTracerProvider(p);\n```\n2. Start a span\n```\n\u003e\u003e tr = opentelemetry.trace.getTracer(\"My Tracer\");\n\u003e\u003e sp = tr.startSpan(\"My Span\");\n```\n3. End the span\n``` \n\u003e\u003e sp.endSpan();\n```\n4. If your collector is configured to display the data, you should see your span displayed. \n### Metrics\n1. Create a default meter provider and save it.\n```\n\u003e\u003e p = opentelemetry.sdk.metrics.MeterProvider();\n\u003e\u003e setMeterProvider(p);\n```\n2. Create a counter\n```\n\u003e\u003e m = opentelemetry.metrics.getMeter(\"My Meter\");\n\u003e\u003e c = m.createCounter(\"My Counter\");\n```\n3. Increment the counter\n```\n\u003e\u003e c.add(10);\n```\n4. If your collector is configured to display the data, you should see your counter displayed after 1 minute.\n\n### Logs\n1. Create a default logger provider and save it.\n```\n\u003e\u003e p = opentelemetry.sdk.logs.LoggerProvider();\n\u003e\u003e setLoggerProvider(p);\n```\n2. Create a logger\n```\n\u003e\u003e l = opentelemetry.logs.getLogger(\"My Logger\");\n```\n3. Emit a log record with \"info\" level\n```\n\u003e\u003e info(l, \"My Message\");\n```\n4. If your collector is configured to display the data, you should see your log record displayed.\n\nFor more examples, see the \"examples\" folder.\n\n## Automatic Instrumentation\nSee example [here](auto-instrumentation/README.md).\n\n## Help\nTo view documentation of individual function, type \"help \\\u003cfunction_name\u003e\\\". For example,\n```\n\u003e\u003e help opentelemetry.sdk.trace.TracerProvider\n```\n \n## License\nThe license is available in the License file within this repository\n\n## Community Support\n[MATLAB Central](https://www.mathworks.com/matlabcentral)\n\nCopyright 2023-2024 The MathWorks, Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks%2Fopentelemetry-matlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathworks%2Fopentelemetry-matlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks%2Fopentelemetry-matlab/lists"}