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

[v2][query] Implement helper to buffer sequence of traces #6401

Merged
merged 10 commits into from
Dec 25, 2024

Conversation

mahadzaryab1
Copy link
Collaborator

@mahadzaryab1 mahadzaryab1 commented Dec 24, 2024

Which problem is this PR solving?

Description of the changes

  • This PR implements a helper AggregateTraces in the jptrace package to aggregate a sequence of []ptrace.Traces to ptrace.Traces. This was done by combining contiguous trace chunks together based on the traceID.

How was this change tested?

  • Added unit tests

Checklist

Copy link

codecov bot commented Dec 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.26%. Comparing base (774bf9f) to head (0a5b4f9).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6401      +/-   ##
==========================================
- Coverage   96.30%   96.26%   -0.04%     
==========================================
  Files         366      367       +1     
  Lines       20946    20978      +32     
==========================================
+ Hits        20171    20195      +24     
- Misses        593      599       +6     
- Partials      182      184       +2     
Flag Coverage Δ
badger_v1 8.94% <0.00%> (-0.03%) ⬇️
badger_v2 1.83% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1-manual 14.87% <0.00%> (-0.05%) ⬇️
cassandra-4.x-v2-auto 1.77% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v2-manual 1.77% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v1-manual 14.87% <0.00%> (-0.05%) ⬇️
cassandra-5.x-v2-auto 1.77% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v2-manual 1.77% <0.00%> (-0.01%) ⬇️
elasticsearch-6.x-v1 18.56% <0.00%> (-0.06%) ⬇️
elasticsearch-7.x-v1 18.62% <0.00%> (-0.07%) ⬇️
elasticsearch-8.x-v1 18.79% <0.00%> (-0.06%) ⬇️
elasticsearch-8.x-v2 1.83% <0.00%> (+<0.01%) ⬆️
grpc_v1 10.60% <0.00%> (-0.05%) ⬇️
grpc_v2 8.10% <0.00%> (-0.03%) ⬇️
kafka-v1 9.30% <0.00%> (-0.03%) ⬇️
kafka-v2 1.83% <0.00%> (-0.01%) ⬇️
memory_v2 1.82% <0.00%> (-0.01%) ⬇️
opensearch-1.x-v1 18.67% <0.00%> (-0.06%) ⬇️
opensearch-2.x-v1 18.67% <0.00%> (-0.06%) ⬇️
opensearch-2.x-v2 1.83% <0.00%> (-0.01%) ⬇️
tailsampling-processor 0.46% <0.00%> (-0.01%) ⬇️
unittests 95.12% <100.00%> (-0.04%) ⬇️

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.

internal/jptrace/aggregator.go Outdated Show resolved Hide resolved
internal/jptrace/aggregator.go Outdated Show resolved Hide resolved
internal/jptrace/aggregator.go Outdated Show resolved Hide resolved
internal/jptrace/aggregator.go Outdated Show resolved Hide resolved
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

lgtm

internal/jptrace/aggregator.go Outdated Show resolved Hide resolved
internal/jptrace/aggregator.go Outdated Show resolved Hide resolved
@mahadzaryab1 mahadzaryab1 changed the title [WIP][v2][query] Implement helper to buffer sequence of traces [v2][query] Implement helper to buffer sequence of traces Dec 25, 2024
@mahadzaryab1 mahadzaryab1 marked this pull request as ready for review December 25, 2024 01:28
@mahadzaryab1 mahadzaryab1 requested a review from a team as a code owner December 25, 2024 01:28
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

lgtm

@yurishkuro yurishkuro enabled auto-merge (squash) December 25, 2024 05:25
@yurishkuro yurishkuro merged commit ba6228f into jaegertracing:main Dec 25, 2024
54 checks passed
@mahadzaryab1 mahadzaryab1 deleted the join-seqs branch December 25, 2024 05:35
mahadzaryab1 added a commit that referenced this pull request Dec 25, 2024
## Description of the changes
- #6401 was accidentally
using the official `iter` package instead of the internal one. This PR
fixes that usage.
- Added a linter rule so we don't accidentally use the official package
again until we upgrade to Go 1.23

## How was this change tested?
- CI

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `npm run lint` and `npm run test`

---------

Signed-off-by: Mahad Zaryab <[email protected]>
Manik2708 pushed a commit to Manik2708/jaeger that referenced this pull request Jan 5, 2025
…ing#6401)

## Which problem is this PR solving?
- Towards jaegertracing#6337 

## Description of the changes
- This PR implements a helper `AggregateTraces` in the `jptrace` package
to aggregate a sequence of `[]ptrace.Traces` to `ptrace.Traces`. This
was done by combining contiguous trace chunks together based on the
traceID.

## How was this change tested?
- Added unit tests

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `npm run lint` and `npm run test`

---------

Signed-off-by: Mahad Zaryab <[email protected]>
Manik2708 pushed a commit to Manik2708/jaeger that referenced this pull request Jan 5, 2025
…g#6403)

## Description of the changes
- jaegertracing#6401 was accidentally
using the official `iter` package instead of the internal one. This PR
fixes that usage.
- Added a linter rule so we don't accidentally use the official package
again until we upgrade to Go 1.23

## How was this change tested?
- CI

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `npm run lint` and `npm run test`

---------

Signed-off-by: Mahad Zaryab <[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