-
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
ctx propagation in otlp/http vs otlp/grpc #10093
Comments
Update:
and then access it with
in my processor, it worksss!! |
I guess the root cause is that in grpc an interceptor to enrich the incoming context is called after the extension's auth method which is overwriting the Metadata set by the extension. I need the batch processor to run after my customprocessor which requires a set of metadata keys to be set. However I am setting the metadata key in the auth extension which is being overidden in grpc requests. |
@grandwizard28 do you have link to where the override is happening? |
@TylerHelmuth
This gives us control over playing with the Metadata in our interceptors. |
@TylerHelmuth |
@grandwizard28 , are you able to create a new test case here, demonstrating the problem? By looking at the code, I'd say that there's no override of these values, but perhaps I'm missing some information. |
Sample test here #10162 |
I left a comment on that PR (and marked it as draft). |
Commented on the PR itself! |
@jpkrohling have commented the PR, can you please check? |
Context
I have written a custom auth extension which derives a key called consumer. I want to batch requests based on consumer by using the batch processor and use the same in a custom exporter.
Issue 1: Batch processor uses the incoming metadata keys to batch. I can set the client.Metadata in my custom auth extension but the otlp/grpc receiver overrides client.Metadata.
Issue 2: For the exporter, I tried setting client.Auth as well in my custom auth extension but the batch processor does not respect it. It creates a new context with only metadata, discarding the Auth (if set) by any authenticators.
Describe the bug
I have created a custom server authenticator extension. At the end I am calling the following:
Basically, I am trying to set some information in the metadata.
Now in one of my subsequent processors, I am trying to access this key. It works fine for http requests but the key is not present for grpc requests.
Steps to reproduce
What did you expect to see?
Context should be preserved for both otlp/http and otlp/grpc
What did you see instead?
What version did you use?
v0.99.0
What config did you use?
*** Additional Context ***
I have been trying for a way to propagate context data from my custom authenticator to all processors and exporters for some time now. Here is a related PR regarding the same: #10002
The text was updated successfully, but these errors were encountered: