-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[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
Conversation
Signed-off-by: Manik2708 <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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. |
Signed-off-by: Manik2708 <[email protected]>
Signed-off-by: Manik2708 <[email protected]>
internal/storage/v2/memory/memory.go
Outdated
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()) |
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deep copy
Signed-off-by: Manik2708 <[email protected]>
Signed-off-by: Manik2708 <[email protected]>
Signed-off-by: Manik2708 <[email protected]>
defer t.Unlock() | ||
if _, ok := t.operations[serviceName]; ok { | ||
t.operations[serviceName][operation] = struct{}{} | ||
return |
There was a problem hiding this comment.
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
## 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]>
## 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]>
Which problem is this PR solving?
Description of the changes
WriteTraces
for memory backendHow was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test