Skip to content

[FEATURE] Prometheus: add request headers and query params interpolation#638

Merged
jgbernalp merged 3 commits into
mainfrom
add-request-interpolation
May 1, 2026
Merged

[FEATURE] Prometheus: add request headers and query params interpolation#638
jgbernalp merged 3 commits into
mainfrom
add-request-interpolation

Conversation

@jgbernalp
Copy link
Copy Markdown
Contributor

@jgbernalp jgbernalp commented Apr 24, 2026

Description

This PR:

  • Allows to interpolate headers and additional query parameters for the prometheus datasource. More datasources will follow.
  • Refactors the client parameters to make the code more readable
  • Updates the perses dependencies to v0.54.0-beta.1

Part of: perses/perses#3940

Needs: perses/shared#118

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [<catalog_entry>] <commit message> naming convention using one of the
    following catalog_entry values: FEATURE, ENHANCEMENT, BUGFIX, BREAKINGCHANGE, DOC,IGNORE.
  • All commits have DCO signoffs.

@jgbernalp jgbernalp requested a review from a team as a code owner April 24, 2026 08:10
@jgbernalp jgbernalp requested review from shahrokni and removed request for a team April 24, 2026 08:10
@AntoineThebaud AntoineThebaud changed the title [FEATURE] add request headers and query params interpolation [FEATURE] Prometheus: add request headers and query params interpolation Apr 27, 2026
@jgbernalp jgbernalp force-pushed the add-request-interpolation branch from c9e5e5d to 672fe74 Compare April 28, 2026 15:12
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
@jgbernalp jgbernalp force-pushed the add-request-interpolation branch 2 times, most recently from f6a3669 to b73eb75 Compare April 28, 2026 17:23
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
@jgbernalp jgbernalp force-pushed the add-request-interpolation branch from b73eb75 to b7dbfd1 Compare April 28, 2026 17:51
newEntries.forEach(({ key, value }) => {
if (key !== '') {
newParams[key] = value;
const parts = value.split(',');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure if this is an issue in practice: What if value is a single value which contains a comma (but should not be an array)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll check to adjust the component in a follow up PR so we can deal with values that have commas internally

@jgbernalp jgbernalp added this pull request to the merge queue May 1, 2026
Merged via the queue into main with commit 2cf76b6 May 1, 2026
16 checks passed
@jgbernalp jgbernalp deleted the add-request-interpolation branch May 1, 2026 13:58
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