-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
KTOR-2527 using baseName prefix for all metrics #2465
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi!
Thanks for your PR and sorry for the lack of attention from our side. I rebased this PR for you so it targets fresh main
branch.
I have one question, though.
} | ||
|
||
@Test | ||
fun testUsePreconfiguredRegistry(): Unit = withTestApplication { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you remove this test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello rsinukov
It is a bad test in my opinion. If I did not miss something, it is a straight copy of "meter is registered for a given path"
but with the addition of testRegistry.register("jvm.memory", MemoryUsageGaugeSet())
but it does not test anything extra that the other test already tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test checks fix for this issue https://youtrack.jetbrains.com/issue/KTOR-1798
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I can put it back but maybe with a better name, "should not throw exception when metric already registered
" or something? the old test is not very clear on what it is testing/expecting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, sounds good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Will merge after CI run
Subsystem
server
Motivation
KTOR-2527
#2527
Solution
Prefix all metrics with
baseName
. Previously only a small part of the metrics was prefixed.