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

Grab Timestamps from Metric #167

Merged

Conversation

janphkre
Copy link
Contributor

With this PR, I want to follow up on #97 after following along the discussion in #80.

I was lacking this functionality, as i was scraping broadcasted messages from a server that supplies the most recent message with a timestamp. (https://github.com/john30/ebusd/wiki/3.2.-HTTP-client)

I hope the code is up to spec as I am really not familiar with go.

@janphkre janphkre force-pushed the feature/metrric_timestamp branch 3 times, most recently from 7a7378b to 9420b27 Compare July 11, 2022 20:52
based on prometheus-community#97 and prometheus-community#80 this provides the posibility to use a metric that has a unix style timestamp as the timestamp of the scraped metric

When deserializing objects we need to take the key json path into account as well like we would do for all the values as well. This allows collections to be defined still with each entry having a separate timestamp (e.g. list of time-stamped log messages).

Update examples for timestamp

Update Readme about staleness for custom timestamps

Signed-off-by: Jan Phillip Kretzschmar <janphkre@gmx.de>
README.md Outdated Show resolved Hide resolved
@SuperQ
Copy link
Contributor

SuperQ commented Aug 26, 2022

Minor documentation correction.

Signed-off-by: Ben Kochie <superq@gmail.com>

Signed-off-by: Ben Kochie <superq@gmail.com>
@SuperQ SuperQ merged commit 9ecc44b into prometheus-community:master Aug 28, 2022
SuperQ added a commit that referenced this pull request Jun 6, 2023
* [FEATURE] Allow timestamps from metrics #167
* [FEATURE] Support Value Conversions #172

Signed-off-by: SuperQ <superq@gmail.com>
@SuperQ SuperQ mentioned this pull request Jun 6, 2023
raedtwj pushed a commit to raedtwj/json_exporter that referenced this pull request Sep 13, 2023
* [FEATURE] Allow timestamps from metrics prometheus-community#167
* [FEATURE] Support Value Conversions prometheus-community#172

Signed-off-by: SuperQ <superq@gmail.com>
Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
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.

None yet

3 participants