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

(batchprocessor): Add tracing support #11324

Closed
wants to merge 19 commits into from

Conversation

jmacd
Copy link
Contributor

@jmacd jmacd commented Oct 1, 2024

Description

The batch processor is frequently responsible for breaking trace context for data passing through the collector. This fixes the batch processor to either continue the trace context (if one parent) or to link the parent contexts. The motivation for this change goes beyond tracing. The same data structure is used in following PRs to address #11308, in which the pendingItem data structure will gain a channel so the export can inform the waiter about completion(s), in which the parentCtx.Done() channel is used to avoid blocking when the caller has already returned.

Link to tracking issue

Part of #11308

Testing

Two new tests for single-parent and multi-parent trace data.

Documentation

Added.

Copy link

codecov bot commented Oct 1, 2024

Codecov Report

Attention: Patch coverage is 99.08257% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.51%. Comparing base (3456b43) to head (e52747a).
Report is 56 commits behind head on main.

Files with missing lines Patch % Lines
processor/batchprocessor/batch_processor.go 99.08% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11324      +/-   ##
==========================================
- Coverage   92.14%   91.51%   -0.63%     
==========================================
  Files         433      433              
  Lines       20396    23701    +3305     
==========================================
+ Hits        18794    21691    +2897     
- Misses       1238     1642     +404     
- Partials      364      368       +4     

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

processor/batchprocessor/batch_processor.go Outdated Show resolved Hide resolved
processor/batchprocessor/batch_processor.go Outdated Show resolved Hide resolved
processor/batchprocessor/batch_processor.go Outdated Show resolved Hide resolved
processor/batchprocessor/batch_processor.go Outdated Show resolved Hide resolved
processor/batchprocessor/batch_processor.go Outdated Show resolved Hide resolved
processor/batchprocessor/batch_processor.go Outdated Show resolved Hide resolved
@jmacd jmacd marked this pull request as ready for review October 1, 2024 18:49
@jmacd jmacd requested a review from a team as a code owner October 1, 2024 18:49
@jmacd jmacd requested a review from evan-bradley October 1, 2024 18:49
processor/batchprocessor/batch_processor.go Show resolved Hide resolved
processor/batchprocessor/batch_processor.go Outdated Show resolved Hide resolved
processor/batchprocessor/batch_processor.go Outdated Show resolved Hide resolved
processor/batchprocessor/batch_processor.go Show resolved Hide resolved
processor/batchprocessor/batch_processor.go Outdated Show resolved Hide resolved
processor/batchprocessor/batch_processor.go Outdated Show resolved Hide resolved
processor/batchprocessor/batch_processor.go Outdated Show resolved Hide resolved
Copy link
Member

@mwear mwear left a comment

Choose a reason for hiding this comment

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

LGTM. @bogdandrutu, you had a lot of feedback on this PR. Have your changes been addressed?

@bogdandrutu
Copy link
Member

LGTM. @bogdandrutu, you had a lot of feedback on this PR.

Having a lot of feedback is it bad or good? Or why did you mentioned this?

Have your changes been addressed?

Not yet, some of the answers to my comments I am unable to understand (most likely because of my IQ level, or other factors). I am still in the understanding mode, and I cannot approve something I don't understand the complexity.

@jmacd
Copy link
Contributor Author

jmacd commented Oct 8, 2024

@evan-bradley What do you think? This is a simple PR to add tracing to a critical component, and I have tried to explain that this is only one of the steps involved in fixing #11308.

@jmacd
Copy link
Contributor Author

jmacd commented Oct 9, 2024

Not yet, some of the answers to my comments I am unable to understand

@bogdandrutu please clarify. I can't guess at which parts of this PR and the overall #11308 are causing trouble.

@jmacd
Copy link
Contributor Author

jmacd commented Oct 30, 2024

Disappointed.

@jmacd jmacd closed this Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants