-
Notifications
You must be signed in to change notification settings - Fork 896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MeterProvider and Meter API spec #1557
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a huge change on how we envisioned metrics API and how we wanted this to be. I am not clear about motivation and direction of this project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I would encourage to create a new file for the moment "new_api.md" it is extremely hard to review since too many deletes and github does not help.
Yes, we'll discuss this in today's Metrics API/SDK SIG meeting. Current options are:
|
Asking because it is hard to read the new text, before merging we can discuss if we replace the old text, but cannot read what is the new text |
a10bd5e
to
0fc42f0
Compare
PTAL. Based on the discussion during the Metrics API/SDK SIG meeting, I've created a separate file ( |
* Different Meters MUST be treated as separate namespaces. The names of the | ||
Instruments under one Meter SHOULD NOT interfere with Instruments under | ||
another Meter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmacd mentioned in Slack:
if you use the same metric name and different instrumentation libraries, the intention is that they are the same metric
However, unless I'm misreading, I don't see this explicitly stated here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"are identified by their name". Maybe that need some highlights/implciations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"are identified by their name". Maybe that need some highlights/implciations.
I'm assuming this is related to: #1113
Since the main section about gauge and histogram was removed no blocker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall a good starting point
|
||
* [Create a new Counter](#counter-creation) (see the section on `Counter`) | ||
|
||
## Instrument |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to say anything about the lifetime of these objects? I'm fine if lifetime is left as the language implementer's choice, or if the spec wants to declare something more specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is fine to not specify the lifetime here (similar like the trace spec).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I'm assuming anything not specified is implicitly implementer's choice : )
```text | ||
+-- MeterProvider(default) | ||
| | ||
+-- Meter(name='io.opentelemetry.runtime', version='1.0.0') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know .NET might be a bit unique here. It's fine if MeterProvider has an API to create a Meter but we were intending that .NET libraries will also be able to create Meter directly (similar to ActivitySource), and that we would recommend them to do so. Thus on .NET MeterProvider needs to be able to subscribe to a Meter that already exists. I don't care whether the spec calls it out, but I want to make sure this isn't taking anyone by surprise in the design process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be the same approach as what ActivitySource
is doing for trace/span, so I don't see a problem here.
**Owner:** | ||
|
||
* [Reiley Yang](https://github.com/reyang) | ||
|
||
**Domain Experts:** | ||
|
||
* [Bogdan Brutu](https://github.com/bogdandrutu) | ||
* [Josh Suereth](https://github.com/jsuereth) | ||
* [Joshua MacDonald](https://github.com/jmacd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB: This is questioned in #1503 and might be removed again.
cc @bogdandrutu
Fixes #1046.
Fixes #1433.
Changes
Follow up on #1533 and the Metrics API/SDK SIG.
Related issues #1113 #1366
Related oteps