Install any skill in seconds. Free to start, no credit card required.
Get Started Free →matlab/matlab-instrument-opentelemetry-tracing
Add OpenTelemetry tracing to MATLAB code.
Passed 22 of 22 test cases with the skill, and 13 of 22 without it.
and 11 more in the full report
9 fixed13 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 9 test cases the skill fixed. Same model, same prompt, with and without the skill.
When instrumenting an internal MATLAB array calculation function versus an outgoing `ftp` file upload function, which `SpanKind` value should be specified for each?
| Checked | Without skill | With skill |
|---|---|---|
| Assigns SpanKind='client' to the outgoing file transfer function span. | Passed | Passed |
| Omits specifying SpanKind for the internal array calculation function span. | Missed | Passed |
The instructions your model reads when the skill loads.
Add OpenTelemetry tracing spans to MATLAB functions with correct implicit context propagation, RAII lifecycle, and semantic conventions.
The OpenTelemetry-MATLAB package (Version 1.11.0 or newer) must be installed. It provides the opentelemetry.trace.* namespace used throughout this skill. Requires MATLAB R2022b or newer.
| Function | Purpose | Toolbox | Available From |
|---|---|---|---|
opentelemetry.trace.getTracer | Obtain a tracer instance by name | OpenTelemetry-MATLAB | R2022b |
startSpan | Create a new span from a tracer | OpenTelemetry-MATLAB | R2022b |
makeCurrent | Set span as current context (enables implicit parent-child) | OpenTelemetry-MATLAB | R2022b |
setAttributes | Attach key-value metadata to a span | OpenTelemetry-MATLAB | R2022b |
setStatus | Mark span as "Ok" or "Error" | OpenTelemetry-MATLAB | R2022b |
recordException | Record an MException on a span | OpenTelemetry-MATLAB | R2022b |
addEvent | Record a timestamped event within a span | OpenTelemetry-MATLAB | R2022b |
endSpan | End a span mid-function (loops only) | OpenTelemetry-MATLAB | R2022b |
The MATLAB OpenTelemetry API differs slightly from C++, Java, and Python implementations. Do not rely on general OTel knowledge from other languages — when unsure about a function, use help opentelemetry.trace.Span or similar to check what exists. Common traps:
setAttribute (singular) does not exist — use setAttributes (plural)opentelemetry.trace.StatusCode.Ok / StatusCode.Error enums do not exist — pass the strings "Ok" or "Error" directly to setStatustest cases passed, vs 13 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.