-
Notifications
You must be signed in to change notification settings - Fork 979
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
Missing option to get response headers in GrpcServerObservationConvention #4012
Comments
WDYT @ttddyy ? For me it seems like a reasonable request. |
looking at the gRPC API, the javadoc of
So, we should not directly store the passed headers( I'll take a look. FYI, the |
Resolves micrometer-metrics#4012 Signed-off-by: Tadaya Tsuyukubo <tadaya@ttddyy.net>
Resolves #4012 Signed-off-by: Tadaya Tsuyukubo <tadaya@ttddyy.net>
…#4516) Resolves micrometer-metrics#4012 Signed-off-by: Tadaya Tsuyukubo <tadaya@ttddyy.net>
Please describe the feature request.
Object of class
GrpcServerObservationContext
is missing response headers, making it impossible to create some KeyValues based on headers values in custom GrpcServerObservationConvention.Class: https://github.com/micrometer-metrics/micrometer/blob/main/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/grpc/ObservationGrpcServerCall.java should override
public void sendHeaders(Metadata headers)
method and add response headers to GrpcServerObservationContext .Only available headers are from the request e.g.
context.getGetter().get(context.getCarrier(), "content-type")
.Response headers could be added by
context.put(Metadata.class, headers)
but separate field would be the best option, e.g.Rationale
We want to add some metrics/tracing tags depending on headers values.
This option is available for Http e.g:
Additional context
This option was also available for Tracing in Sleuth library e.g.:
The text was updated successfully, but these errors were encountered: