Skip to content

gRPC client interceptor incorrectly registers status CANCELLED as error #6261

@cfredri4

Description

@cfredri4

Describe the bug
ObservationGrpcClientCallListener registers all closures with a cause as an error. This is wrong because CANCELLED is not an error (and in theory even status OK could have a cause, but no one should do that).

In general when one cancels an RPC you don't supply a cause which means it will not be registered as error, but gRPC will set a cause when it automaticall cancels outgoing RPCs due to cancellation propogation from an incoming RPC. Then you get ⬇ which has a cause and thus gets registered as error:
Status{code=CANCELLED, description=RPC cancelled, cause=io.grpc.InternalStatusRuntimeException: CANCELLED: RPC cancelled

For reference, ObservationGrpcServerCallListener never treats cancellations as errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA general buginstrumentationAn issue that is related to instrumenting a componentmodule: micrometer-coreAn issue that is related to our core module

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions