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

Refactor collector pipeline to allow v1/v2 data model #6484

Merged
merged 8 commits into from
Jan 5, 2025

Conversation

yurishkuro
Copy link
Member

Which problem is this PR solving?

Description of the changes

  • Extend SpanProcessor interface to carry either v1 or v2 spans

How was this change tested?

  • CI

Copy link

codecov bot commented Jan 5, 2025

Codecov Report

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

Project coverage is 96.29%. Comparing base (4024a24) to head (2df3d4e).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/collector/app/span_processor.go 85.71% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6484   +/-   ##
=======================================
  Coverage   96.28%   96.29%           
=======================================
  Files         371      372    +1     
  Lines       21251    21277   +26     
=======================================
+ Hits        20462    20489   +27     
+ Misses        604      603    -1     
  Partials      185      185           
Flag Coverage Δ
badger_v1 10.67% <ø> (ø)
badger_v2 2.78% <ø> (ø)
cassandra-4.x-v1-manual 16.51% <ø> (ø)
cassandra-4.x-v2-auto 2.71% <ø> (ø)
cassandra-4.x-v2-manual 2.71% <ø> (ø)
cassandra-5.x-v1-manual 16.51% <ø> (ø)
cassandra-5.x-v2-auto 2.71% <ø> (ø)
cassandra-5.x-v2-manual 2.71% <ø> (ø)
elasticsearch-6.x-v1 20.18% <ø> (ø)
elasticsearch-7.x-v1 20.25% <ø> (ø)
elasticsearch-8.x-v1 20.41% <ø> (+<0.01%) ⬆️
elasticsearch-8.x-v2 2.77% <ø> (-0.01%) ⬇️
grpc_v1 12.31% <ø> (ø)
grpc_v2 9.08% <ø> (-0.01%) ⬇️
kafka-3.x-v1 10.35% <ø> (ø)
kafka-3.x-v2 2.78% <ø> (ø)
memory_v2 2.78% <ø> (ø)
opensearch-1.x-v1 20.30% <ø> (+<0.01%) ⬆️
opensearch-2.x-v1 20.30% <ø> (ø)
opensearch-2.x-v2 2.77% <ø> (-0.01%) ⬇️
tailsampling-processor 0.51% <ø> (ø)
unittests 95.17% <95.65%> (+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.

yurishkuro and others added 6 commits January 4, 2025 21:29
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
@yurishkuro yurishkuro marked this pull request as ready for review January 5, 2025 03:26
@yurishkuro yurishkuro requested a review from a team as a code owner January 5, 2025 03:26
@yurishkuro yurishkuro requested a review from jkowall January 5, 2025 03:26
@dosubot dosubot bot added the v2 label Jan 5, 2025
@yurishkuro
Copy link
Member Author

@mahadzaryab1 PTAL

Copy link
Collaborator

@mahadzaryab1 mahadzaryab1 left a comment

Choose a reason for hiding this comment

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

just a couple of questions

cmd/collector/app/processor/processor.go Show resolved Hide resolved
cmd/collector/app/processor/processor.go Show resolved Hide resolved
@@ -81,7 +81,7 @@ func (w *traceWriter) WriteTraces(ctx context.Context, td ptrace.Traces) error {
scope ptrace.ScopeSpans
resource ptrace.ResourceSpans
)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I've been running into this too when running make fmt. I'm not sure why CI doesn't complain but it gets fixed when running make fmt locally.

Copy link
Member Author

Choose a reason for hiding this comment

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

We may have lost this in some refactoring. We do have linters (e.g. ./scripts/lint/updateLicense.py) that can modify the files and then fail if there were changes. We could have the same with a lint step that runs make fmt and fails if there's a diff.

cmd/collector/app/processor/processor.go Show resolved Hide resolved
@yurishkuro yurishkuro enabled auto-merge (squash) January 5, 2025 21:10
@yurishkuro yurishkuro disabled auto-merge January 5, 2025 21:22
@yurishkuro yurishkuro enabled auto-merge (squash) January 5, 2025 21:24
@yurishkuro yurishkuro merged commit b1153a0 into jaegertracing:main Jan 5, 2025
54 checks passed
@yurishkuro yurishkuro deleted the pipeline-add-v2-model branch January 5, 2025 21:29
adityachopra29 pushed a commit to adityachopra29/jaeger that referenced this pull request Jan 9, 2025
…6484)

## Which problem is this PR solving?
- Part of jaegertracing#6474

## Description of the changes
- Extend SpanProcessor interface to carry either v1 or v2 spans

## How was this change tested?
- CI

---------

Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: adityachopra29 <[email protected]>
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