Skip to content
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

Merged
merged 4 commits into from
Oct 29, 2021
Merged

Conversation

MrTetrixx
Copy link
Contributor

Subsystem
server

Motivation
KTOR-2527
#2527

Solution
Prefix all metrics with baseName. Previously only a small part of the metrics was prefixed.

Copy link

@rsinukov rsinukov left a 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 {

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?

Copy link
Contributor Author

@MrTetrixx MrTetrixx Oct 23, 2021

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.

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

Copy link
Contributor Author

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, sounds good!

@rsinukov rsinukov self-assigned this Oct 22, 2021
Copy link

@rsinukov rsinukov left a 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

@rsinukov rsinukov merged commit 4e9747b into ktorio:main Oct 29, 2021
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.

None yet

3 participants