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

Option to omit timestamp #108

Merged
merged 3 commits into from
Dec 1, 2022
Merged

Option to omit timestamp #108

merged 3 commits into from
Dec 1, 2022

Conversation

anegrin
Copy link
Contributor

@anegrin anegrin commented Nov 30, 2022

In prometheus exposition format timestamps are not mandatory; here's my current setup:

  • ESP32 is emitting external temp and hum to MQTT and then going into deep sleep for 15 minutes
  • Omitting the timestamp let the scraping "to emit" a value on each scrape

I opted for 0 time value instead of playing with pointers and nil

hikhvar
hikhvar previously approved these changes Nov 30, 2022
Copy link
Owner

@hikhvar hikhvar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the use case, and I like the implementation. Could you please add that option to the example configuration in the readme with a proper comment?

@hikhvar hikhvar merged commit dbe1195 into hikhvar:master Dec 1, 2022
@anegrin anegrin deleted the no-timestamps branch December 1, 2022 10:02
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.

2 participants