-
Notifications
You must be signed in to change notification settings - Fork 542
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
frontend: allow injecting custom middlewares #8342
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
colega
approved these changes
Jun 11, 2024
Signed-off-by: Miguel Ángel Ortuño <ortuman@gmail.com>
Signed-off-by: Miguel Ángel Ortuño <ortuman@gmail.com>
ortuman
force-pushed
the
ortuman/frontend/allow-mapping-middleware
branch
from
June 14, 2024 12:10
bbe2049
to
023f43f
Compare
Signed-off-by: Miguel Ángel Ortuño <ortuman@gmail.com>
ortuman
force-pushed
the
ortuman/frontend/allow-mapping-middleware
branch
from
June 14, 2024 12:14
023f43f
to
25dc80c
Compare
colega
approved these changes
Jun 14, 2024
krajorama
added a commit
that referenced
this pull request
Jun 17, 2024
Make it more explicit that injection is only applied to instance and range queries. Follows #8342 Related to https://github.com/grafana/mimir-squad/issues/2148 Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
krajorama
added a commit
that referenced
this pull request
Jun 17, 2024
Make it more explicit that injection is only applied to instance and range queries. Follows #8342 Related to https://github.com/grafana/mimir-squad/issues/2148 Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
krajorama
added a commit
that referenced
this pull request
Jun 17, 2024
Make it more explicit that injection is only applied to instance and range queries. Follows #8342 Related to https://github.com/grafana/mimir-squad/issues/2148 Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does
This PR adds an additional field named
ExtraMiddlewares
to middleware config type that allows an upstream project to inject custom middlewares into the middleware harness without interfering with the main functionality of the frontend component.UPDATE: After thoroughly inspecting the implementation of
MetricsQueryRequest
, I've observed that during the decoding process the original headers of the HTTP request are discarded. However, these headers can be of particular interest to external middlewares. Therefore, I've decided to add an extra method,GetHeaders
to the interface and rename the proto type fromPrometheusResponseHeader
to simplyPrometheusHeader
.Which issue(s) this PR fixes or relates to
Fixes N/A