Remove support for flexible labels in collector middleware#121
Merged
Conversation
We decided in #111 that the current interface for this is confusing to the point where it's more trouble than it's worth. The alternatives we came up with result in the middleware doing almost nothing and delegating to user-provided lambdas. Since we're pre-1.0, we're removing this in the belief that if it turns out to be a widely-requested feature, we can come up with something better. Leaving this implementation in would commit us to an interface we don't like. Fixes #111 Signed-off-by: Chris Sinjakli <chris@gocardless.com>
41d6e7f to
0bc912e
Compare
added 2 commits
May 7, 2019 11:28
Signed-off-by: Chris Sinjakli <chris@gocardless.com>
This is a small quality of life enhancement when debugging test failures. When you comment out the catch-all `rescue` in the production code of Prometheus::Middleware::Collector, you see a `NoMethodError` with no stack or message attached. Initially, this is pretty confusing, and you may think it was the reason for your tests failing! In fact, it's to test the catch-all rescue. This commit makes it really explicit that the error is deliberately coming from the tests. Signed-off-by: Chris Sinjakli <chris@gocardless.com>
4a16638 to
11a2813
Compare
1 similar comment
Member
|
/cc @splattael |
dmagliola
approved these changes
May 7, 2019
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.
We decided in #111 that the current interface for this is confusing to
the point where it's more trouble than it's worth.
The alternatives we came up with result in the middleware doing almost
nothing and delegating to user-provided lambdas.
Since we're pre-1.0, we're removing this in the belief that if it turns
out to be a widely-requested feature, we can come up with something
better. Leaving this implementation in would commit us to an interface
we don't like.
Fixes #111