Skip to content
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

Asynch Instruments: Spec Conformance #733

Closed
hdost opened this issue Feb 12, 2022 · 3 comments · Fixed by #819
Closed

Asynch Instruments: Spec Conformance #733

hdost opened this issue Feb 12, 2022 · 3 comments · Fixed by #819
Labels
A-metrics Area: issues related to metrics

Comments

@hdost
Copy link
Contributor

hdost commented Feb 12, 2022

In an effort to get closer to the spec I was taking a look at the asynchronous instruments. There's an opportunity for a few different namings which might make more sense. I'd like to put it to
UpDownCounterObserver is now Asynchronous UpDownCounter
Sum Observer is now Aysynchronous Counter
ValueObserver is now Asynchronous Gauge

However even in the spec there is some different suggestions for names. Before I go down the route of making a big patch I'd like to discuss the naming. Personally I think the following would be the best names for the replacements (in order):

  • <type>_asynchronous_up_down_counter
  • <type>_asynchronous_counter
  • <type>_asynchronous_gauge or <type>_gauge

Alternatives would be:

  • <type>_observable_up_down_counter
  • <type>_observable_counter
  • <type>_observable_gauge or <type>_gauge

Obviously there would be CamelCase types associated, but these would be the meter methods.

Additionally, I've seen in some languages that their choosing to implement the asynchronous gauges as use gauges. In either case of the above mentioned there could be an possibility of using: <type>_gauge

@TommyCpp
Copy link
Contributor

TommyCpp commented Feb 13, 2022

I think observable may be clearer as async/asynchronous is a very important concept in Rust and I don't want to people to confuse the async instrument as something that must be used in async runtime.

@jtescher
Copy link
Member

Also a heads up that the metrics impl may need to be almost completely re-written as many parts of the design are not great and the spec has changed since the first impl. Been focusing on getting the trace side to 1.0 first, but feel free to get a head start looking at better options here 👍

@TommyCpp TommyCpp added the A-metrics Area: issues related to metrics label Feb 13, 2022
@hdost
Copy link
Contributor Author

hdost commented Feb 14, 2022

I think observable may be clearer as async/asynchronous is a very important concept in Rust and I don't want to people to confuse the async instrument as something that must be used in async runtime.

Makes perfect sense to me.

What do you think of the gauge vs observable_gauge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-metrics Area: issues related to metrics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants