Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Support encoding optional headers in the OTLP-Arrow exporter #35

Merged
merged 6 commits into from
Jan 19, 2023

Conversation

jmacd
Copy link
Contributor

@jmacd jmacd commented Jan 13, 2023

Description:
This exports the result returned by the Auth extensions' credentials.PerRPCCredentials interface if present and exports it with the Arrow batch using the new optional bytes field added here: f5/otel-arrow-adapter#85. This matches the behavior of the Receiver in #34. The problem about Auth is described in open-telemetry/opentelemetry-collector#6965.

Unrelated cleanup. While working on the testbed, I noticed it is helpful if the Settings type is exported, not an internal package. This moves the ArrowSettings up two levels.

Part of #33

@jmacd
Copy link
Contributor Author

jmacd commented Jan 13, 2023

The exporter has been updated with a new configuration struct named IncludeClientMetadataSettings that allows listing client.Info.Metadata keys to propagate via the exporter. As coded this feature applies to both the OTLP-gRPC standard and Arrow exporters. Left a note about how this probably ought to be added to the OTLP/HTTP exporter for parity.

@jmacd
Copy link
Contributor Author

jmacd commented Jan 13, 2023

@ptal especially @paivagustavo, thanks!

@jmacd jmacd requested a review from kristinapathak January 13, 2023 21:34
@jmacd
Copy link
Contributor Author

jmacd commented Jan 19, 2023

PTAL. I have updated the exporter to locate the Auth extension and use its PerRPCCredentials().GetRequestMetadata() to get per-request headers. All the existing mechanisms work at the stream level, and I will update the Receiver PR to correctly merge the incoming context (from the stream) w/ the per-request metadata (from the arrow batch).

Copy link
Member

@paivagustavo paivagustavo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for taking a look at the auth extensions.

@jmacd jmacd merged commit 84d43ff into open-telemetry:main Jan 19, 2023
@jmacd jmacd deleted the jmacd/exp_hpack branch January 19, 2023 19:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants