Skip to content

Improve provider naming consistency#7978

Open
aaryan359 wants to merge 2 commits intojaegertracing:mainfrom
aaryan359:refactor/rename-strategy-provider
Open

Improve provider naming consistency#7978
aaryan359 wants to merge 2 commits intojaegertracing:mainfrom
aaryan359:refactor/rename-strategy-provider

Conversation

@aaryan359
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

  • Renamed the strategyProvider field to provider to better reflect its type (samplingstrategy.Provider)
  • Updated all internal references in the implementation and tests
  • Improves clarity by clearly distinguishing providers from stores (e.g. adaptiveStore)
  • No behavioral or API changes — refactor only

How was this change tested?

  • Existing unit tests were run and all passed
  • Code builds cleanly with no lint issues

Checklist

Signed-off-by: aaryan359 <aaryanmeena96@gmail.com>
@aaryan359
Copy link
Contributor Author

@jkowall and @yurishkuro, is this looking good?

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.57%. Comparing base (1f24223) to head (b1e3325).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7978      +/-   ##
==========================================
- Coverage   95.60%   95.57%   -0.03%     
==========================================
  Files         316      316              
  Lines       16773    16773              
==========================================
- Hits        16035    16031       -4     
- Misses        577      580       +3     
- Partials      161      162       +1     
Flag Coverage Δ
badger_v1 9.16% <ø> (ø)
badger_v2 1.89% <ø> (ø)
cassandra-4.x-v1-manual 13.36% <ø> (ø)
cassandra-4.x-v2-auto 1.88% <ø> (ø)
cassandra-4.x-v2-manual 1.88% <ø> (ø)
cassandra-5.x-v1-manual 13.36% <ø> (ø)
cassandra-5.x-v2-auto 1.88% <ø> (ø)
cassandra-5.x-v2-manual 1.88% <ø> (ø)
clickhouse 1.97% <ø> (ø)
elasticsearch-6.x-v1 17.20% <ø> (ø)
elasticsearch-7.x-v1 17.23% <ø> (ø)
elasticsearch-8.x-v1 17.38% <ø> (ø)
elasticsearch-8.x-v2 1.89% <ø> (ø)
elasticsearch-9.x-v2 1.89% <ø> (ø)
grpc_v1 8.41% <ø> (ø)
grpc_v2 1.89% <ø> (ø)
kafka-3.x-v2 1.89% <ø> (ø)
memory_v2 1.89% <ø> (ø)
opensearch-1.x-v1 17.27% <ø> (ø)
opensearch-2.x-v1 17.27% <ø> (ø)
opensearch-2.x-v2 1.89% <ø> (ø)
opensearch-3.x-v2 1.89% <ø> (ø)
query 1.89% <ø> (ø)
tailsampling-processor 0.54% <ø> (ø)
unittests 94.26% <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.

@jkowall jkowall added the changelog:refactoring Internal code refactoring without functional changes label Feb 4, 2026
@jkowall jkowall requested a review from Copilot February 4, 2026 12:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses a TODO comment regarding naming consistency in the remote sampling extension by renaming the strategyProvider field to provider. This is a refactor that improves code clarity by better distinguishing providers from stores.

Changes:

  • Renamed the strategyProvider struct field to provider in the rsExtension type
  • Updated all references to use the new field name throughout the implementation and tests
  • Removed the TODO comment that requested this change

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
cmd/jaeger/internal/extension/remotesampling/extension.go Renamed struct field from strategyProvider to provider and updated all 6 references in the implementation
cmd/jaeger/internal/extension/remotesampling/extension_test.go Updated test to use the renamed provider field

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aaryan359
Copy link
Contributor Author

aaryan359 commented Feb 7, 2026

@jkowall @yurishkuro, I need to update something else, or does this look good?

@aaryan359
Copy link
Contributor Author

@jkowall any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/sampling changelog:refactoring Internal code refactoring without functional changes enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants