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

Use GRPC interceptors instead of explicit context wrappers #6133

Merged
merged 3 commits into from
Oct 29, 2024

Conversation

chahatsagarmain
Copy link
Contributor

@chahatsagarmain chahatsagarmain commented Oct 28, 2024

Which problem is this PR solving?

Description of the changes

How was this change tested?

Checklist

Signed-off-by: chahatsagarmain <[email protected]>
Signed-off-by: chahatsagarmain <[email protected]>
Copy link

codecov bot commented Oct 28, 2024

Codecov Report

Attention: Patch coverage is 91.30435% with 2 lines in your changes missing coverage. Please review.

Project coverage is 96.43%. Comparing base (640615e) to head (6a520a5).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
cmd/query/app/server.go 85.71% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6133      +/-   ##
==========================================
+ Coverage   96.41%   96.43%   +0.01%     
==========================================
  Files         353      353              
  Lines       20135    20128       -7     
==========================================
- Hits        19414    19410       -4     
+ Misses        535      532       -3     
  Partials      186      186              
Flag Coverage Δ
badger_v1 8.32% <0.00%> (+<0.01%) ⬆️
badger_v2 1.68% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1 14.40% <0.00%> (+0.01%) ⬆️
cassandra-4.x-v2 1.62% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v1 14.40% <0.00%> (+0.01%) ⬆️
cassandra-5.x-v2 1.62% <0.00%> (-0.01%) ⬇️
elasticsearch-6.x-v1 18.53% <0.00%> (+0.02%) ⬆️
elasticsearch-7.x-v1 18.61% <0.00%> (+0.02%) ⬆️
elasticsearch-8.x-v1 18.78% <0.00%> (+0.02%) ⬆️
elasticsearch-8.x-v2 1.67% <0.00%> (-0.01%) ⬇️
grpc_v1 9.49% <87.50%> (-0.05%) ⬇️
grpc_v2 7.00% <0.00%> (-0.01%) ⬇️
kafka-v1 8.89% <0.00%> (+<0.01%) ⬆️
kafka-v2 1.68% <0.00%> (-0.01%) ⬇️
memory_v2 1.68% <0.00%> (+<0.01%) ⬆️
opensearch-1.x-v1 18.65% <0.00%> (+<0.01%) ⬆️
opensearch-2.x-v1 18.65% <0.00%> (+0.01%) ⬆️
opensearch-2.x-v2 1.68% <0.00%> (-0.01%) ⬇️
tailsampling-processor 0.47% <0.00%> (-0.01%) ⬇️
unittests 95.34% <91.30%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: chahatsagarmain <[email protected]>
@@ -117,7 +82,7 @@ func (c *GRPCClient) ArchiveSpanWriter() spanstore.Writer {

// GetTrace takes a traceID and returns a Trace associated with that traceID
func (c *GRPCClient) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error) {
stream, err := c.readerClient.GetTrace(upgradeContext(ctx), &storage_v1.GetTraceRequest{
Copy link
Member

Choose a reason for hiding this comment

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

where is the code that attaches interceptors to the client that would do these upgrades instead?

Copy link
Contributor Author

@chahatsagarmain chahatsagarmain Oct 29, 2024

Choose a reason for hiding this comment

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

Interceptors are being attached to shared client in /plugin/storage/grpc/factory.go

grpcClient := shared.NewGRPCClient(tracedRemoteConn, untracedRemoteConn)

@yurishkuro yurishkuro changed the title Refactoring and using interceptor Use GRPC interceptors instead of explicit context wrappers Oct 29, 2024
@yurishkuro yurishkuro merged commit 0af8d35 into jaegertracing:main Oct 29, 2024
48 of 50 checks passed
@yurishkuro
Copy link
Member

Thanks!

yurishkuro added a commit to yurishkuro/jaeger that referenced this pull request Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Implement bearer token auth interceptor
2 participants