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

[storage][v2] Add reader adapter that just exposes the underlying v1 reader #6221

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

mahadzaryab1
Copy link
Collaborator

Which problem is this PR solving?

Description of the changes

  • This PR implements the v2 spanstore.Reader interface in the factory adapter through the TraceReader, which is currently just a wrapper around the v1 spanstore.Reader. The TraceReader provides a function GetV1Reader that exposes the underlying v1 reader which will be used in [v2][storage] Implement read path for v2 storage interface #6170.

How was this change tested?

  • Added unit tests for new functions

Checklist

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.43%. Comparing base (939d7c3) to head (5d13a31).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6221   +/-   ##
=======================================
  Coverage   96.43%   96.43%           
=======================================
  Files         354      355    +1     
  Lines       20134    20157   +23     
=======================================
+ Hits        19416    19439   +23     
  Misses        530      530           
  Partials      188      188           
Flag Coverage Δ
badger_v1 8.31% <ø> (ø)
badger_v2 1.67% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1 14.39% <ø> (ø)
cassandra-4.x-v2 1.61% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v1 14.39% <ø> (ø)
cassandra-5.x-v2 1.61% <0.00%> (-0.01%) ⬇️
elasticsearch-6.x-v1 18.60% <ø> (ø)
elasticsearch-7.x-v1 18.68% <ø> (ø)
elasticsearch-8.x-v1 18.85% <ø> (ø)
elasticsearch-8.x-v2 1.67% <0.00%> (+<0.01%) ⬆️
grpc_v1 9.44% <ø> (ø)
grpc_v2 6.98% <0.00%> (-0.02%) ⬇️
kafka-v1 8.88% <ø> (ø)
kafka-v2 1.67% <0.00%> (-0.01%) ⬇️
memory_v2 1.67% <0.00%> (-0.01%) ⬇️
opensearch-1.x-v1 18.73% <ø> (ø)
opensearch-2.x-v1 18.73% <ø> (+<0.01%) ⬆️
opensearch-2.x-v2 1.67% <0.00%> (+<0.01%) ⬆️
tailsampling-processor 0.46% <0.00%> (-0.01%) ⬇️
unittests 95.35% <100.00%> (+<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.


🚨 Try these New Features:

}

func (*TraceReader) GetTrace(_ context.Context, _ pcommon.TraceID) (ptrace.Traces, error) {
panic("not implemented")
Copy link
Member

Choose a reason for hiding this comment

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

at some point we would need to implement these methods, because as soon as we start upgrading query subcomponents to use v2 storage api directly (e.g. the apiv3 handler, the easiest to upgrade since it already returns OTLP formats) they will be blocked on this implementation for v1-only backends.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@yurishkuro what would these implementations look like?

Copy link
Member

Choose a reason for hiding this comment

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

you would call the underlying v1 reader to retrieve the trace and then convert the result into OTLP data model

@yurishkuro yurishkuro changed the title [storage][v2] Implement v2 storage reader that wraps around v1 storage reader [storage][v2] Add reader adapter that just exposes the underlying v1 reader Nov 19, 2024
@yurishkuro yurishkuro merged commit 41948cb into jaegertracing:main Nov 19, 2024
55 checks passed
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