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] Add helper to storage extension for retrieving sampling store factory #6689

Merged
merged 9 commits into from
Feb 8, 2025

Conversation

mahadzaryab1
Copy link
Collaborator

@mahadzaryab1 mahadzaryab1 commented Feb 7, 2025

Which problem is this PR solving?

Description of the changes

  • Adds a helper to get the sampling store factory from the jaeger storage extension.
  • In a follow-up PR, we'll need to do the same for the Purger interface.

How was this change tested?

  • CI

Checklist

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.03%. Comparing base (bc2a643) to head (2e367a6).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6689      +/-   ##
==========================================
+ Coverage   95.99%   96.03%   +0.04%     
==========================================
  Files         363      363              
  Lines       20601    20608       +7     
==========================================
+ Hits        19775    19791      +16     
+ Misses        630      624       -6     
+ Partials      196      193       -3     
Flag Coverage Δ
badger_v1 9.82% <ø> (ø)
badger_v2 1.82% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1-manual 14.79% <ø> (ø)
cassandra-4.x-v2-auto 1.81% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v2-manual 1.81% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v1-manual 14.79% <ø> (ø)
cassandra-5.x-v2-auto 1.81% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v2-manual 1.81% <0.00%> (-0.01%) ⬇️
elasticsearch-6.x-v1 19.12% <ø> (ø)
elasticsearch-7.x-v1 19.20% <ø> (ø)
elasticsearch-8.x-v1 19.37% <ø> (ø)
elasticsearch-8.x-v2 1.82% <0.00%> (-0.01%) ⬇️
grpc_v1 10.80% <ø> (ø)
grpc_v2 7.80% <0.00%> (-0.01%) ⬇️
kafka-3.x-v1 10.12% <ø> (ø)
kafka-3.x-v2 1.82% <0.00%> (-0.01%) ⬇️
memory_v2 1.82% <0.00%> (-0.01%) ⬇️
opensearch-1.x-v1 19.25% <ø> (ø)
opensearch-2.x-v1 19.25% <ø> (ø)
opensearch-2.x-v2 1.82% <0.00%> (-0.01%) ⬇️
tailsampling-processor 0.48% <0.00%> (-0.01%) ⬇️
unittests 94.91% <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.

Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
@mahadzaryab1 mahadzaryab1 changed the title [WIP][storage] Add helper to storage extension for retrieving sampling store factory [storage] Add helper to storage extension for retrieving sampling store factory Feb 7, 2025
@mahadzaryab1 mahadzaryab1 marked this pull request as ready for review February 7, 2025 21:47
@mahadzaryab1 mahadzaryab1 requested a review from a team as a code owner February 7, 2025 21:47
@mahadzaryab1 mahadzaryab1 requested a review from jkowall February 7, 2025 21:47
@@ -83,6 +83,20 @@ func GetTraceStoreFactory(name string, host component.Host) (tracestore.Factory,
return v1adapter.NewFactory(f), nil
}

func GetSamplingStoreFactory(name string, host component.Host) (storage.SamplingStoreFactory, bool) {
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer to return error and let the caller log it. Otherwise how would we catch config errors when say remote sampling processor asks for a storage by the wrong name.

Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
@yurishkuro yurishkuro merged commit 24dfa4f into jaegertracing:main Feb 8, 2025
55 checks passed
@mahadzaryab1 mahadzaryab1 deleted the sampling-store-helper branch February 8, 2025 15:43
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