Skip to content
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

Plumb target to OpenTelemetry per-call metrics (1.64.x backport) #11182

Merged
merged 2 commits into from May 9, 2024

Conversation

ejona86
Copy link
Member

@ejona86 ejona86 commented May 8, 2024

You'll probably want to look at the two commits separately. I am sending them in one PR because the second commit shows "what the heck Eric is doing." Each commit has a useful commit message.

I can't say I'm wild about this solution at the current state, but there are some options for getting us out of this strangeness. We need to have a team discussion, and the only thing we guarantee here that might be hard to undo is "when you configure a channel with opentelemetry, that dictates the interceptor order." Which seems appropriate for all solutions.

Backport of #11153

This will be used for gRFC A66's OTel per-RPC metric label:

> `grpc.target` : Canonicalized target URI used when creating gRPC
> Channel, e.g. "dns:///pubsub.googleapis.com:443",
> "xds:///helloworld-gke:8000". Canonicalized target URI is the form
> with the scheme included if the user didn't mention the scheme
> (`scheme://[authority]/path`).

The majority of the changes are to move target computation from
ManagedChannelImpl into the builder. A small hack API was added to
ManagedChannelBuilder to get the target to create an interceptor.
As defined by gRFC A66, the target is on all client-side per-call
metrics (both call and attempt).
@ejona86 ejona86 requested a review from temawi May 8, 2024 23:26
@ejona86 ejona86 merged commit 1994125 into grpc:v1.64.x May 9, 2024
13 checks passed
@ejona86 ejona86 deleted the backport-target-to-interceptor-1.64 branch May 9, 2024 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants