Skip to content

[v2] Implement WriteTraces for Memory backend #7027

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

Merged
merged 11 commits into from
Apr 18, 2025

Conversation

Manik2708
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

  • Implement WriteTraces for memory backend

How was this change tested?

  • Unit And Snapshot Tests

Checklist

@Manik2708 Manik2708 requested a review from a team as a code owner April 14, 2025 16:37
@Manik2708 Manik2708 requested a review from mahadzaryab1 April 14, 2025 16:37
Copy link

codecov bot commented Apr 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.02%. Comparing base (e60b2df) to head (9dc33a0).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7027      +/-   ##
==========================================
+ Coverage   96.01%   96.02%   +0.01%     
==========================================
  Files         349      351       +2     
  Lines       20677    20806     +129     
==========================================
+ Hits        19852    19980     +128     
  Misses        622      622              
- Partials      203      204       +1     
Flag Coverage Δ
badger_v1 9.98% <ø> (ø)
badger_v2 2.07% <ø> (ø)
cassandra-4.x-v1-manual 15.02% <ø> (ø)
cassandra-4.x-v2-auto 2.06% <ø> (ø)
cassandra-4.x-v2-manual 2.06% <ø> (ø)
cassandra-5.x-v1-manual 15.02% <ø> (ø)
cassandra-5.x-v2-auto 2.06% <ø> (ø)
cassandra-5.x-v2-manual 2.06% <ø> (ø)
elasticsearch-6.x-v1 19.88% <ø> (ø)
elasticsearch-7.x-v1 19.96% <ø> (ø)
elasticsearch-8.x-v1 20.13% <ø> (ø)
elasticsearch-8.x-v2 2.07% <ø> (ø)
grpc_v1 11.53% <ø> (ø)
grpc_v2 9.16% <ø> (ø)
kafka-3.x-v1 10.26% <ø> (ø)
kafka-3.x-v2 2.07% <ø> (ø)
memory_v2 2.07% <ø> (ø)
opensearch-1.x-v1 20.01% <ø> (ø)
opensearch-2.x-v1 20.01% <ø> (ø)
opensearch-2.x-v2 2.07% <ø> (ø)
tailsampling-processor 0.56% <ø> (ø)
unittests 94.80% <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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yurishkuro
Copy link
Member

Fixes a part of: Upgrade Storage Backends to V2 Storage API #6458

I recommend you create a separate sub-issue of the main ticket dedicated to specific storage backend, not link everything to a single umbrella ticket.

@Manik2708 Manik2708 requested a review from yurishkuro April 15, 2025 17:22
@yurishkuro yurishkuro added the changelog:exprimental Change to an experimental part of the code label Apr 15, 2025
for _, span := range spanSlice.All() {
// Collect all the spans with same trace id within the same scope span sameTraceIDSpanSlice
if sameTraceIDSpanSlice, ok := sameTraceIDSpans[span.TraceID()]; ok {
span.CopyTo(sameTraceIDSpanSlice.AppendEmpty())
Copy link
Member

Choose a reason for hiding this comment

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

is CopyTo doing a deep copy or shallow (just copying pointer to the underlying Proto object)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

deep copy

@Manik2708 Manik2708 requested a review from yurishkuro April 17, 2025 05:03
defer t.Unlock()
if _, ok := t.operations[serviceName]; ok {
t.operations[serviceName][operation] = struct{}{}
return
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reduced the nesting here also

@Manik2708 Manik2708 requested a review from yurishkuro April 18, 2025 17:19
@yurishkuro yurishkuro added this pull request to the merge queue Apr 18, 2025
Merged via the queue into jaegertracing:main with commit 734e1be Apr 18, 2025
56 checks passed
amilbcahat pushed a commit to amilbcahat/jaeger that referenced this pull request May 4, 2025
## Which problem is this PR solving?
- Fixes a part of: jaegertracing#6458 

## Description of the changes
- Implement `WriteTraces` for memory backend

## How was this change tested?
- Unit And Snapshot 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: Manik2708 <[email protected]>
amilbcahat pushed a commit to amilbcahat/jaeger that referenced this pull request May 4, 2025
## Which problem is this PR solving?
- Fixes a part of: jaegertracing#6458

## Description of the changes
- Implement `WriteTraces` for memory backend

## How was this change tested?
- Unit And Snapshot 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: Manik2708 <[email protected]>
Signed-off-by: amol-verma-allen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/storage changelog:exprimental Change to an experimental part of the code v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants