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

[extension/jaegerremotesampling] gRPC remote mode propagates configured HTTP headers #24414

Conversation

zcross
Copy link
Contributor

@zcross zcross commented Jul 20, 2023

Description: This could be described as a fix or an improvement to the jaegerremotesampling extension.

Status quo: For usages in which a remote source is specified using collector-wide standard configgrpc.GRPCClientSettings, the given HTTP headers are not actually set on outbound calls to the destination grpcstore.SamplingManager endpoint.

After this PR: Outbound calls will add any HTTP headers specified in the gRPC client settings for the remote source. This will mean that drop-in extension usage will support use cases in which header additions are necessary for remote interactions. I took an approach that I observed in several other exporters/extensions: "enhancing" the gRPC context.

Link to tracking Issue: N/A

Testing: Existing extension integration tests have been updated to perform a (previously not performed) client-like HTTP call to the extension's running gRPC server, and then to verify that an observed call to a gRPC remote includes configured HTTP header additions (as gRPC metadata).

Documentation: N/A: I assumed the behavior that this PR now implements, because the gRPC client settings config is so "standard" throughout the opentelemetry-collector repo (and other extensions in this contrib repo).

@zcross zcross requested a review from a team July 20, 2023 15:43
@zcross zcross requested a review from jpkrohling as a code owner July 20, 2023 15:43
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 20, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@zcross zcross changed the title [extension/jaegerremotesampling] Update gRPC remote source to add headings [extension/jaegerremotesampling] Update gRPC remote source to add headers Jul 20, 2023
@github-actions github-actions bot requested a review from frzifus July 20, 2023 15:43
@zcross zcross force-pushed the zcross/jaegerremotesampling/support-header-enhancement-outbound-grpc branch from 4d4f0b0 to ec96378 Compare July 20, 2023 16:44
@zcross zcross changed the title [extension/jaegerremotesampling] Update gRPC remote source to add headers [extension/jaegerremotesampling] gRPC remote mode propagates configured HTTP headers Jul 20, 2023
@frzifus frzifus self-assigned this Jul 24, 2023
@zcross zcross force-pushed the zcross/jaegerremotesampling/support-header-enhancement-outbound-grpc branch 3 times, most recently from 7f96994 to 062e2e9 Compare July 27, 2023 13:42
@zcross zcross force-pushed the zcross/jaegerremotesampling/support-header-enhancement-outbound-grpc branch from f50107c to 7ed58ea Compare August 2, 2023 14:13
Copy link
Member

@frzifus frzifus left a comment

Choose a reason for hiding this comment

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

LGTM, one final thing ^^

@zcross zcross force-pushed the zcross/jaegerremotesampling/support-header-enhancement-outbound-grpc branch from 0dc14af to 8e5ba20 Compare August 2, 2023 22:16
Copy link
Member

@frzifus frzifus left a comment

Choose a reason for hiding this comment

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

There is no need to store it internally, right?

zcross and others added 2 commits August 3, 2023 07:30
…nt-outbound-grpc.yaml

Co-authored-by: Antoine Toulme <antoine@toulme.name>
@zcross zcross force-pushed the zcross/jaegerremotesampling/support-header-enhancement-outbound-grpc branch from 3820148 to 60fd963 Compare August 3, 2023 11:30
@atoulme atoulme added the ready to merge Code review completed; ready to merge by maintainers label Aug 3, 2023
@jpkrohling jpkrohling merged commit 88c3006 into open-telemetry:main Aug 3, 2023
93 checks passed
@github-actions github-actions bot added this to the next release milestone Aug 3, 2023
@zcross
Copy link
Contributor Author

zcross commented Aug 5, 2023

I have validated this in a real environment in recent days, and it seems to be working properly (as the integration tests suggested, obviously).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension/jaegerremotesampling ready to merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants