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

Request: Support for Synchronous Gauge #2771

Closed
manvydasu opened this issue Sep 5, 2022 · 2 comments
Closed

Request: Support for Synchronous Gauge #2771

manvydasu opened this issue Sep 5, 2022 · 2 comments
Assignees
Labels
duplicate This issue or pull request already exists spec:metrics Related to the specification/metrics directory

Comments

@manvydasu
Copy link

What are you trying to achieve?

I'll start from an example.

Let's say there is a scheduled job which retrieves some data from DB, runs some business calculations and performs some set of actions. At the end of such job, some data is collected (i.e. amount of processed and unprocessed items due to business errors).

I'd like to have that data (i.e. amount of unprocessed items) displayed in my monitoring tool, however with the current otel implementation/specification I can not easily collect such metric.
Gauge looks like the best tool for such job, but the problem here is that it's asynchronous and works by sampling. Since the amount of unprocessable items is only known/calculated at the end of job, my value can't easily be sampled asynchronously.

Looks like the best approach would be to update such metric at the end of the job. (Sync gauge which updates the value whenever needed)

I'm pretty sure there should be some other situations where synchronous gauge would be preferred over asynchronous one.

Let me know if this doesn't make any sense.

Additional context.

Somebody else has also asked for such feature support in opentelemetry-js repository and his use case is explained there - open-telemetry/opentelemetry-js#3103

@manvydasu manvydasu added the spec:metrics Related to the specification/metrics directory label Sep 5, 2022
@trask
Copy link
Member

trask commented Sep 7, 2022

hi @manvydasu! check out #2318

@manvydasu
Copy link
Author

Hi @trask,
Looks like that's exact same issue that I'm and someone in open-telemetry/opentelemetry-js#3103 was dealing with.

This can be closed as duplicate, my aplogies, not sure how I missed that by searching.

@rbailey7210 rbailey7210 added the duplicate This issue or pull request already exists label Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists spec:metrics Related to the specification/metrics directory
Projects
None yet
Development

No branches or pull requests

4 participants