Skip to content

Support querying live-stores via header#5640

Merged
mapno merged 5 commits intografana:mainfrom
mapno:livestore-query-conditionally
Sep 18, 2025
Merged

Support querying live-stores via header#5640
mapno merged 5 commits intografana:mainfrom
mapno:livestore-query-conditionally

Conversation

@mapno
Copy link
Copy Markdown
Contributor

@mapno mapno commented Sep 11, 2025

What this PR does:

It adds support to query the live stores for recent data instead of ingesters by passing the header Recent-Data-Target with value live-store. This allows to run both modules at the same time and query one or the other per request.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Comment thread pkg/api/http.go Outdated
Comment thread pkg/api/http.go Outdated
HeaderContentType = "Content-Type"
HeaderAcceptProtobuf = "application/protobuf"
HeaderAcceptJSON = "application/json"
HeaderRecentDataTarget = "X-Recent-Data-Target"
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.

nit: Isn't the X prefix against the preferences these days for headers?

https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers

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.

Yeah, but we use that convention within Tempo and Grafana. I wasn't sure what to do in this case. It's a temporary header, so I didn't think much about it. Removed.

Comment thread modules/querier/http.go Outdated
@mapno mapno merged commit 79bbab4 into grafana:main Sep 18, 2025
37 of 38 checks passed
@mapno mapno deleted the livestore-query-conditionally branch September 18, 2025 12:42
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