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

[refactor] Decouple storage factory creation and initialization #6272

Closed
wants to merge 13 commits into from

Conversation

yurishkuro
Copy link
Member

@yurishkuro yurishkuro commented Nov 28, 2024

Which problem is this PR solving?

Description of the changes

  • Telemetry providers are dependencies of storage factories. Dependencies should normally be provided at construction time. This change moves logger and metrics parameters from Initialize() function into NewFactory() function
  • Make factories depend on full telemetry.Setings instead of individual loggers, metrics, etc.

How was this change tested?

  • CI

Checklist

Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
@yurishkuro yurishkuro changed the title Factories Decouple storage factory creation and initialization Nov 28, 2024
Copy link

codecov bot commented Nov 28, 2024

Codecov Report

Attention: Patch coverage is 64.61538% with 69 lines in your changes missing coverage. Please review.

Project coverage is 48.87%. Comparing base (76593a6) to head (9d6920a).

Files with missing lines Patch % Lines
plugin/storage/es/factory.go 48.57% 18 Missing ⚠️
plugin/storage/factory.go 65.95% 13 Missing and 3 partials ⚠️
pkg/telemetry/settings.go 37.50% 9 Missing and 1 partial ⚠️
...eger/internal/extension/jaegerstorage/extension.go 0.00% 7 Missing ⚠️
plugin/storage/cassandra/factory.go 84.44% 7 Missing ⚠️
plugin/storage/blackhole/factory.go 0.00% 4 Missing ⚠️
plugin/storage/badger/factory.go 75.00% 3 Missing ⚠️
plugin/storage/grpc/factory.go 83.33% 2 Missing ⚠️
plugin/storage/memory/factory.go 75.00% 2 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (76593a6) and HEAD (9d6920a). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (76593a6) HEAD (9d6920a)
unittests 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #6272       +/-   ##
===========================================
- Coverage   96.41%   48.87%   -47.55%     
===========================================
  Files         355      179      -176     
  Lines       20152    10848     -9304     
===========================================
- Hits        19430     5302    -14128     
- Misses        532     5100     +4568     
- Partials      190      446      +256     
Flag Coverage Δ
badger_v1 8.23% <7.97%> (-0.08%) ⬇️
badger_v2 1.66% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1 14.48% <23.40%> (+0.09%) ⬆️
cassandra-4.x-v2 1.60% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v1 14.48% <23.40%> (+0.09%) ⬆️
cassandra-5.x-v2 1.60% <0.00%> (-0.01%) ⬇️
elasticsearch-6.x-v1 18.35% <12.23%> (-0.26%) ⬇️
elasticsearch-7.x-v1 18.44% <12.23%> (-0.24%) ⬇️
elasticsearch-8.x-v1 18.59% <12.23%> (-0.26%) ⬇️
elasticsearch-8.x-v2 1.66% <0.00%> (-0.01%) ⬇️
grpc_v1 9.42% <29.78%> (-0.02%) ⬇️
grpc_v2 7.09% <23.58%> (+0.10%) ⬆️
kafka-v1 8.78% <6.38%> (-0.09%) ⬇️
kafka-v2 1.66% <0.00%> (-0.01%) ⬇️
memory_v2 1.66% <0.00%> (-0.01%) ⬇️
opensearch-1.x-v1 18.48% <12.23%> (-0.27%) ⬇️
opensearch-2.x-v1 18.48% <12.23%> (-0.27%) ⬇️
opensearch-2.x-v2 1.65% <0.00%> (-0.02%) ⬇️
tailsampling-processor 0.46% <0.00%> (-0.01%) ⬇️
unittests ?

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: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
@yurishkuro yurishkuro changed the title Decouple storage factory creation and initialization [refactor] Decouple storage factory creation and initialization Nov 28, 2024
yurishkuro and others added 4 commits November 28, 2024 19:02
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
@yurishkuro yurishkuro closed this Nov 29, 2024
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.

1 participant