-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[extension/jaegerremotesampling] gRPC remote mode propagates configured HTTP headers #24414
Conversation
extension/jaegerremotesampling/internal/remote_strategy_store.go
Outdated
Show resolved
Hide resolved
4d4f0b0
to
ec96378
Compare
7f96994
to
062e2e9
Compare
extension/jaegerremotesampling/internal/remote_strategy_store.go
Outdated
Show resolved
Hide resolved
extension/jaegerremotesampling/internal/remote_strategy_store.go
Outdated
Show resolved
Hide resolved
extension/jaegerremotesampling/internal/remote_strategy_store.go
Outdated
Show resolved
Hide resolved
f50107c
to
7ed58ea
Compare
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, one final thing ^^
extension/jaegerremotesampling/internal/remote_strategy_store.go
Outdated
Show resolved
Hide resolved
extension/jaegerremotesampling/internal/remote_strategy_store.go
Outdated
Show resolved
Hide resolved
extension/jaegerremotesampling/internal/remote_strategy_store.go
Outdated
Show resolved
Hide resolved
0dc14af
to
8e5ba20
Compare
.chloggen/zcross_jaegerremotesampling_support-header-enhancement-outbound-grpc.yaml
Outdated
Show resolved
Hide resolved
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.
There is no need to store it internally, right?
extension/jaegerremotesampling/internal/remote_strategy_store.go
Outdated
Show resolved
Hide resolved
extension/jaegerremotesampling/internal/remote_strategy_store.go
Outdated
Show resolved
Hide resolved
…TTP headers in GRPCClientSettings
…nt-outbound-grpc.yaml Co-authored-by: Antoine Toulme <[email protected]>
3820148
to
60fd963
Compare
I have validated this in a real environment in recent days, and it seems to be working properly (as the integration tests suggested, obviously). |
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 destinationgrpcstore.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).