Skip to content

Add support for undocumented query options for API #1743

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

Merged
merged 3 commits into from
Feb 21, 2025

Conversation

mahendrapaipuri
Copy link
Contributor

@mahendrapaipuri mahendrapaipuri commented Feb 17, 2025

  • WithLookbackDelta and WithStats options have been added to API client.
  • lookback_delta can be especially handy when dealing with mix of continuous and intermittent time series.

* `WithLookbackDelta` and `WithPerStepStats` options have been added to API client.

Signed-off-by: Mahendra Paipuri <mahendra.paipuri@gmail.com>
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Thanks, just one suggestion around stats.

mahendrapaipuri and others added 2 commits February 20, 2025 14:07
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Mahendra Paipuri <44365948+mahendrapaipuri@users.noreply.github.com>
* Use a custom `StatsValue` type to provide as query parameter for `stats` option.

Signed-off-by: Mahendra Paipuri <mahendra.paipuri@gmail.com>
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Thanks!

@bwplotka bwplotka merged commit 6b820eb into prometheus:main Feb 21, 2025
9 checks passed
ying-jeanne pushed a commit to ying-jeanne/client_golang that referenced this pull request Mar 28, 2025
* refactor: Add support for undocumented query options for API

* `WithLookbackDelta` and `WithPerStepStats` options have been added to API client.

Signed-off-by: Mahendra Paipuri <mahendra.paipuri@gmail.com>

* Update api/prometheus/v1/api.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Mahendra Paipuri <44365948+mahendrapaipuri@users.noreply.github.com>

* refactor: Address PR comments and feedback

* Use a custom `StatsValue` type to provide as query parameter for `stats` option.

Signed-off-by: Mahendra Paipuri <mahendra.paipuri@gmail.com>

---------

Signed-off-by: Mahendra Paipuri <mahendra.paipuri@gmail.com>
Signed-off-by: Mahendra Paipuri <44365948+mahendrapaipuri@users.noreply.github.com>
Co-authored-by: Bartlomiej Plotka <bwplotka@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