-
Notifications
You must be signed in to change notification settings - Fork 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
Add connector name tag for JettyConnectionMetrics
and JettySslHandshakeMetricsBinder
#2603
Add connector name tag for JettyConnectionMetrics
and JettySslHandshakeMetricsBinder
#2603
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.
I'm generally in favor of this change, but it makes an asymmetry between the outcome of the two ways the JettyConnectionMetrics
can be applied. If you do connector.addBean(new JettyConnectionMetrics(registry))
then the connector.name
tag won't be there. Since we don't have a reference to the Connector
, we can't do much about that given the current API. I wonder if we shouldn't move the API in the direction of passing the Connector
to the constructor so we can add the connector.name
tag in either case.
I also wonder if it should be possible not to use the connector’s name as a tag? In the |
@wilkinsona I'm not sure if I fully understand your comment. Do you mean a flag to control addition of the tag for connector's name? Maybe, you might mean to provide more context in the following incomplete sentence that seems to have been removed accidentally. |
Oops. Sorry, not sure how I managed that. I intended to say the following: In the single connector case, if things change as suggested above by @shakuzen, that could be done by only setting the |
@wilkinsona Thanks for clarification! I can see how it could work, but I'm not sure if it's natural to use them as a signal for adding the tag. Maybe, I might miss something. |
b25752c
to
ac2c3a5
Compare
I updated this PR to try to apply the suggestion from @shakuzen. I didn't deprecate the previous constructors as they provide a way not to use the connector's name as a tag. I wasn't able to apply the suggestion from @wilkinsona as I don't think I fully understand it. Let me know what you think. If it's okay, I'll update this PR to apply the same changes to |
Sorry for the confusion, @izeye. Please ignore my suggested way of achieving the goal. It's really just the goal itself that's important and that is for a user to be able to register metrics for a |
ac2c3a5
to
45aec8b
Compare
@wilkinsona Thanks for the feedback! I updated this PR to apply the same changes to Please let me know if anything else needs to be done. |
Looks good to me, @izeye. |
JettyConnectionMetrics
and JettySslHandshakeMetricsBinder
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.
Looks good to me.
This PR adds connector name tag for
JettyConnectionMetrics
.See spring-projects/spring-boot#26418 (comment)
/cc @wilkinsona