Skip to content

Pass Context through span processors#6534

Merged
yurishkuro merged 2 commits intojaegertracing:mainfrom
yurishkuro:add-context
Jan 13, 2025
Merged

Pass Context through span processors#6534
yurishkuro merged 2 commits intojaegertracing:mainfrom
yurishkuro:add-context

Conversation

@yurishkuro
Copy link
Copy Markdown
Member

@yurishkuro yurishkuro commented Jan 12, 2025

Which problem is this PR solving?

Description of the changes

  • Add Context argument to handler and span processor methods

How was this change tested?

  • CI

Signed-off-by: Yuri Shkuro <github@ysh.us>
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.23%. Comparing base (f60bd09) to head (d322175).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6534      +/-   ##
==========================================
+ Coverage   96.21%   96.23%   +0.02%     
==========================================
  Files         372      372              
  Lines       21360    21360              
==========================================
+ Hits        20551    20556       +5     
+ Misses        616      612       -4     
+ Partials      193      192       -1     
Flag Coverage Δ
badger_v1 10.65% <ø> (ø)
badger_v2 2.78% <ø> (ø)
cassandra-4.x-v1-manual 16.55% <ø> (ø)
cassandra-4.x-v2-auto 2.71% <ø> (ø)
cassandra-4.x-v2-manual 2.71% <ø> (ø)
cassandra-5.x-v1-manual 16.55% <ø> (ø)
cassandra-5.x-v2-auto 2.71% <ø> (ø)
cassandra-5.x-v2-manual 2.71% <ø> (ø)
elasticsearch-6.x-v1 20.23% <ø> (+<0.01%) ⬆️
elasticsearch-7.x-v1 20.30% <ø> (ø)
elasticsearch-8.x-v1 20.45% <ø> (ø)
elasticsearch-8.x-v2 2.77% <ø> (-0.01%) ⬇️
grpc_v1 12.17% <ø> (-0.01%) ⬇️
grpc_v2 9.04% <ø> (ø)
kafka-3.x-v1 10.34% <ø> (ø)
kafka-3.x-v2 2.78% <ø> (ø)
memory_v2 2.77% <ø> (-0.01%) ⬇️
opensearch-1.x-v1 20.34% <ø> (-0.01%) ⬇️
opensearch-2.x-v1 20.35% <ø> (ø)
opensearch-2.x-v2 2.77% <ø> (ø)
tailsampling-processor 0.51% <ø> (ø)
unittests 95.11% <100.00%> (+0.02%) ⬆️

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.

@yurishkuro yurishkuro marked this pull request as ready for review January 13, 2025 01:30
@yurishkuro yurishkuro requested a review from a team as a code owner January 13, 2025 01:30
}

func (sp *spanProcessor) processSpans(batch processor.Batch, spans []*model.Span) ([]bool, error) {
func (sp *spanProcessor) processSpans(_ context.Context, batch processor.Batch, spans []*model.Span) ([]bool, error) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

just curious - why are we passing the context in here if its not being used?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

better have it and not need it

Signed-off-by: Yuri Shkuro <github@ysh.us>
@yurishkuro yurishkuro enabled auto-merge (squash) January 13, 2025 04:02
@yurishkuro yurishkuro merged commit 441c274 into jaegertracing:main Jan 13, 2025
@yurishkuro yurishkuro deleted the add-context branch January 13, 2025 04:13
ekefan pushed a commit to ekefan/jaeger that referenced this pull request Jan 14, 2025
## Which problem is this PR solving?
- Context is lost in the process, see
jaegertracing#6491 (comment)

## Description of the changes
- Add Context argument to handler and span processor methods

## How was this change tested?
- CI

---------

Signed-off-by: Yuri Shkuro <github@ysh.us>
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.

2 participants