Skip to content

Add support for undocumented query options for API#1743

Merged
bwplotka merged 3 commits intoprometheus:mainfrom
mahendrapaipuri:add_more_query_opts
Feb 21, 2025
Merged

Add support for undocumented query options for API#1743
bwplotka merged 3 commits intoprometheus:mainfrom
mahendrapaipuri:add_more_query_opts

Conversation

@mahendrapaipuri
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread api/prometheus/v1/api.go Outdated
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
Copy Markdown
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
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.

3 participants