-
Notifications
You must be signed in to change notification settings - Fork 63
#1: Autoconfigure metric registry support #41
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
Conversation
Signed-off-by: Sunny <hmtang@gmail.com> [resolves spring-projects#1]
onobc
left a comment
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.
Thanks @hmtang for the contribution. I have made a few request for changes. Let us know if you have any questions or need further clarifications - we are excited to have you on the project. Thank you.
...src/main/java/org/springframework/grpc/autoconfigure/server/GrpcServerAutoConfiguration.java
Outdated
Show resolved
Hide resolved
spring-grpc-core/src/main/java/org/springframework/grpc/server/DefaultGrpcServerFactory.java
Outdated
Show resolved
Hide resolved
spring-grpc-core/src/main/java/org/springframework/grpc/server/DefaultGrpcServerFactory.java
Outdated
Show resolved
Hide resolved
|
Thanks a lot for the feedbacks. I would be out for a short trip in next week. I would look into this when I get back. Appreciate your time on the reviews. |
|
I don't think we need |
I agree w/ this @making . I think we should just add auto-configuration for the Micrometer Observations API (which gives metrics and tracing) and if users want to only use Micrometer metrics they can add it in via interceptor themselves. We have started taking this approach in our newer Spring projects (e.g. Spring Pulsar only provides support for Observations API). Most Spring projects were incepted prior to the availability of Observations API therefore Micrometer support was already in place. @dsyer do you agree w/ this? |
|
100% |
- keep only AutoConfiguration Signed-off-by: Sunny <hmtang@gmail.com> [resolves spring-projects#1]
|
Tried to change to include only AutoConfiguration for the Metric, I am not entire sure about whether this is enough for the change. Please have a look. Thanks a lot. |
- format fix Signed-off-by: Sunny <hmtang@gmail.com> [resolves spring-projects#1]
onobc
left a comment
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.
Nice work @hmtang ! A have added a few comments/suggestions.
Besides the suggestions, once we get the base configuration in this PR we will definitely want to document how to enable observations in a Spring gRPC application. There are quite a few moving pieces and it can be confusing. It does not have to be in this PR though as it may get large.
We did this exact thing for Spring Pulsar docs and we can clone/own those or just point to the SB docs on this topic.
We may want to create a sample that uses Micrometer observations as well (we did the same thing in Spring Pulsar here.
...in/java/org/springframework/grpc/autoconfigure/server/GrpcServerMetricAutoConfiguration.java
Outdated
Show resolved
Hide resolved
...in/java/org/springframework/grpc/autoconfigure/server/GrpcServerMetricAutoConfiguration.java
Show resolved
Hide resolved
...va/org/springframework/grpc/autoconfigure/server/GrpcServerMetricAutoConfigurationTests.java
Outdated
Show resolved
Hide resolved
...in/java/org/springframework/grpc/autoconfigure/server/GrpcServerMetricAutoConfiguration.java
Show resolved
Hide resolved
- rename metric to observation - new condition changes Signed-off-by: Sunny <hmtang@gmail.com> [resolves spring-projects#1]
|
Thanks for the reviews. I have pushed a new changes for the requested changes. |
|
"This branch cannot be rebased safely" according to github, so you need to rebase. Probably a good idea to squash your commits into one as well and force push back to your fork. |
Sorry @dsyer , |
Signed-off-by: Sunny hmtang@gmail.com
[resolves #1]