Skip to content

Conversation

@Manik2708
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

  • Implement GetDependencies for memory backend

How was this change tested?

  • Unit Tests

Checklist

@Manik2708 Manik2708 requested a review from a team as a code owner May 23, 2025 08:48
@Manik2708 Manik2708 requested a review from joe-elliott May 23, 2025 08:48
Signed-off-by: Manik2708 <[email protected]>
@Manik2708
Copy link
Contributor Author

I have a question: Do we need to consider the case when start time is 0 but end time is not? Currently it will throw an error in this case!

@codecov
Copy link

codecov bot commented May 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.19%. Comparing base (0d02bc8) to head (860ba44).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7154      +/-   ##
==========================================
- Coverage   96.21%   96.19%   -0.03%     
==========================================
  Files         361      361              
  Lines       21779    21838      +59     
==========================================
+ Hits        20955    21006      +51     
- Misses        616      622       +6     
- Partials      208      210       +2     
Flag Coverage Δ
badger_v1 9.87% <ø> (ø)
badger_v2 1.90% <ø> (ø)
cassandra-4.x-v1-manual 14.85% <ø> (ø)
cassandra-4.x-v2-auto 1.89% <ø> (ø)
cassandra-4.x-v2-manual 1.89% <ø> (ø)
cassandra-5.x-v1-manual 14.85% <ø> (ø)
cassandra-5.x-v2-auto 1.89% <ø> (ø)
cassandra-5.x-v2-manual 1.89% <ø> (ø)
elasticsearch-6.x-v1 20.69% <ø> (ø)
elasticsearch-7.x-v1 20.77% <ø> (ø)
elasticsearch-8.x-v1 20.95% <ø> (ø)
elasticsearch-8.x-v2 1.90% <ø> (ø)
grpc_v1 11.41% <ø> (ø)
grpc_v2 1.90% <ø> (ø)
kafka-3.x-v1 10.14% <ø> (ø)
kafka-3.x-v2 1.90% <ø> (ø)
memory_v2 1.90% <ø> (ø)
opensearch-1.x-v1 20.82% <ø> (ø)
opensearch-2.x-v1 20.82% <ø> (ø)
opensearch-2.x-v2 1.90% <ø> (ø)
query 1.90% <ø> (ø)
tailsampling-processor 0.51% <ø> (ø)
unittests 95.00% <100.00%> (-0.03%) ⬇️

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.

SpanKind: span.Kind().String(),
}
m.storeOperation(serviceName, operation)
if startTime.IsZero() || endTime.IsZero() {
Copy link
Member

Choose a reason for hiding this comment

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

Why does this need to be in this function instead of in the tenant? The tenant has additional checks for time anyway, I don't see the value in splitting the logic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason is: Tenant is just storing the traces. The logic in tenant expects that the start and end time of trace is already found because tenant doesn't iterates the spans it just sees if a trace with same trace id already exists and if yes then it appends the resource spans to that trace and if not then it creates a new trace. This same is hapenning here. Firstly we iterate the spans of a trace and find the start and end time and then send them to tenant. Now tenant sees if there exists a trace already, if yes then append the spans to that trace and update the start and end time (if bounds are out of the range of start and end time) and if not then just create new trace with start and time. How are we expected to find start and end time of trace in tenant?

Copy link
Member

Choose a reason for hiding this comment

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

tenant can run the same loop you're running here to identify the timestamps. The memory storage itself has no use for those timestamps, so why does it need to know about them and increase the API surface of the tenant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does the new way looks fine?

Signed-off-by: Manik2708 <[email protected]>
@yurishkuro yurishkuro added the changelog:exprimental Change to an experimental part of the code label May 23, 2025
Signed-off-by: Manik2708 <[email protected]>
@Manik2708 Manik2708 requested a review from yurishkuro May 24, 2025 16:22
@yurishkuro yurishkuro added this pull request to the merge queue May 24, 2025
Merged via the queue into jaegertracing:main with commit 463d928 May 24, 2025
59 checks passed
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.

2 participants