Repository navigation
Conversation
brettimus
marked this pull request as draft
August 28, 2023 16:01
brettimus
marked this pull request as ready for review
August 28, 2023 20:32
Contributor
I think this is the correct way of dealing with this 👍
I think |
hatchan
reviewed
Aug 30, 2023
Co-authored-by: Benno van den Berg <[email protected]>
Co-authored-by: Benno van den Berg <[email protected]>
This reverts commit 87f30a8.
hatchan
approved these changes
Aug 30, 2023
This file contains hidden or 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
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.
Description
This PR adds support for an
am proxycommand, which would--listen-addressand--explorer-address)/prometheusto a user-specified url (configured via--prometheus-url)So, if we already had prometheus running on
http://localhost:8063for some odd reason, we could run:And
amwould not download/launch prometheus, but explorer would still be accessible and automagically connected to the Prometheus instance we're interested in connecting to.For what it's worth, I tested that scenario, and it does indeed work.
Where I need help
I wanted to create a handler factory, but struggled immensely with the type definition, because you can't use
impl Traitto describe the return type for aFntrait (rust-lang/rust#99697).What I wanted was something that looked like:
Ultimately, I gave up, and opted to use inline blocks/closures to define the handlers for this functionality.
Additionally, I figured we would need to rewrite the path of any requests to
/prometheus/*before forwarding to the external prometheus. There has to be a better/more concise way than I chose.Basically, this PR still needs some cleanup, api review (is
proxythe right command name even?), and probably some tests.Checklist