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

Add Gauge#set_to_current_time #287

Merged
merged 1 commit into from
Jun 13, 2023
Merged

Conversation

Sinjo
Copy link
Member

@Sinjo Sinjo commented Jun 9, 2023

I was porting some code from Python to Ruby today, and when I went to call this method, I realised we don't have it!

My use-case is to track the last time some code successfully ran.

I'm open to discussing the naming, but I've defaulted to the name used in client_python because it seems good to me.


Fixes #51 (I think?)

I was porting some code from Python to Ruby today, and when I went to
call this method, I realised we don't have it!

My use-case is to track the last time some code successfully ran.

I'm open to discussing the naming, but I've defaulted to the name used
in `client_python` because it seems good to me.

Signed-off-by: Chris Sinjakli <chris@sinjakli.co.uk>
@Sinjo Sinjo requested a review from dmagliola June 9, 2023 15:41
@electron0zero
Copy link
Member

I think we are missing it in client_ruby, and should add it, guide on writing client says Guage SHOULD have this method:

A gauge SHOULD have the following methods:
set_to_current_time(): Set the gauge to the current unixtime in seconds.

source: https://prometheus.io/docs/instrumenting/writing_clientlibs/#gauge

@Sinjo
Copy link
Member Author

Sinjo commented Jun 13, 2023

Perfect. Let's do this!

@Sinjo Sinjo merged commit 7507716 into main Jun 13, 2023
9 checks passed
@Sinjo Sinjo deleted the sinjo-add-gauge-current-timestamp branch June 13, 2023 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support metric timestamps
2 participants