Skip to content

How to instrument specific methods with gRPC OpenTelemetry metrics in Java without global interception? #12383

@ziyoushibo

Description

@ziyoushibo

I want to use gRPC's OpenTelemetry observability capabilities in Java, specifically only the metrics feature. However, I don't want to use the global interceptor approach shown in the official demo. I only want to add instrumentation to a few specific methods.

Could you please provide a code example showing how to achieve this? I would greatly appreciate any help with implementing method-specific metrics collection instead of global interception.

Thank you very much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions