README Examples error

Open Beginner friendly
#257 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
76/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Domain
documentation

Research direction

Start with the Metrics example in the repository README, which the issue identifies as using spaces in instrument names. Read the OpenTelemetry instrument name syntax linked in the issue, then update the example to use a valid name; done when the README no longer shows an invalid instrument name. The suggestion to make MATLAB throw an error is a separate, broader change.

Written by the indexing model from the issue text.

Description

The Metrics example in the repo's readme shows the creation of a counter as follows

m = opentelemetry.metrics.getMeter("My Meter");
c = m.createCounter("My Counter");

When run in Matlab the following error is received.

c = m.createCounter("My Counter");
[Error] File: *\meter.cc:158 Meter::CreateDoubleCounter - failed. Invalid parameters.My Counter . Measurements won't be recorded.

It appears a no-op counter instead of throwing an error.

Per https://opentelemetry.io/docs/specs/otel/metrics/api/?utm_source=kapa#instrument-name-syntax Metric Instrument Names should not contain spaces. The readme should be updated to reflect that, it may also be worthwhile to have matlab throw an error and not create this no-op counter if a name is invalid.

Dominant language
MATLAB
Stars
21
Forks
5
Avg merge
1m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mathworks/OpenTelemetry-MATLAB

All issues in mathworks/OpenTelemetry-MATLAB

Similar issues

More MATLAB issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.