-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
monitoring: WithUserAgent option is ignored #10550
Comments
The output of the test when it fails is:
|
Thank you so much for narrowing down the search to the specific commit. I think I found the issue. The commit in question is a one line change - adds So we need to either patch in that one if condition check to inject the grpc dial option OR centralize where that option is converted. @dashpole if you need a quick workaround, try specifying the gRPC DialOption directly instead: option.WithGRPCDialOption(
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithUserAgent(expectedUserAgentRegex),
), That might do the trick, since those options are passed through. I'll start on a patch soon. |
The fix was released. We will update the deps for these modules, but in the meantime you should be able to get the new version within your own Going to close this once we have the deps updated in this repo. |
Fixed by dep update in #10572 pending release, which should happen this week. |
Client
MetricClient
Environment
local unit test.
Go Environment
$ go version
$ go env
Code
The issue can be reproduced using the following unit test:
e.g.
Expected behavior
The User-Agent metadata of the outgoing request includes the user agent provided by
option.WithUserAgent
.Actual behavior
option.WithUserAgent
is ignored.Screenshots
N/A
Additional context
This was a regression I found when attempting to update this dependency: GoogleCloudPlatform/opentelemetry-operations-go#867
I've isolated the issue to #10402. The test passes at 5cb0c26, but fails at d6c543c.
The text was updated successfully, but these errors were encountered: