-
Notifications
You must be signed in to change notification settings - Fork 10
Support decoding optional headers in the OTLP-Arrow receiver #34
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Updated the receiver to use |
Note: I've updated this PR with a slight fix. This code now respects the GRPCServerSettings.IncludeMetadata flag. This must be set for headers to be set into the client context. |
Due to the changes in #35 I will now update this PR to merge the incoming context (from the stream, including the static metadata and any the Auth plugin returns for a background context) with the per-request metadata that is transmitted per batch by the exporter. |
This PR now matches #35: when |
Did some refactoring of the new header-decoding logic to make it more readable, added a few tests and corrected lint errors. 88f4210 |
Description:
This sets the incoming gRPC headers from the new optional bytes field added here: f5/otel-arrow-adapter#85. The behavior of this change matches #35 in the exporter.
The gRPC stream's incoming context is merged with the per-request metadata calculated for the individual data item. This addresses a problem described in greater detail in open-telemetry/opentelemetry-collector#6965. There is a suggestion that OTC would be better off with a new extension type for non-auth-related metadata, but for now the Arrow receiver expects the exporter to run the Auth extension on the request context and serialize the result; the best the receiver can do is merge the two metadatas.
Part of #33