* Pick timestamp from metric
based on #97 and #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>
Signed-off-by: Ben Kochie <superq@gmail.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
* Add ignore_status
Signed-off-by: Alexander Ryabov <alexander.ryabov@jetbrains.com>
* Use valid_status_codes slice
Signed-off-by: Alexander Ryabov <alexander.ryabov@jetbrains.com>
Co-authored-by: Alexander Ryabov <alexander.ryabov@jetbrains.com>
* support modules configuration
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
* fallback default module if the param is missing
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
* update readme and example config file
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
* fix lint
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
Refactor FetchJson to use a constructor.
* Cleanup nolint to use a a .golangci.yml config.
* Switch go-kit/kit/log to go-kit/log.
Signed-off-by: SuperQ <superq@gmail.com>
* Update changelog
* Bump Go modules.
* Update NewClientFromConfig use
* Bump Go to 1.15.
prometheus/common#249 added option to disable HTTP/2.
Signed-off-by: Ben Kochie <superq@gmail.com>