Skip to content

Refactor MeteredEmbeddingProvider to be only wrapper, not sub-class, renamed as MeteredEmbeddingProviderWrapper#2397

Merged
tatu-at-datastax merged 5 commits intomainfrom
tatu/refactor-metered-embedding-provider
Feb 17, 2026
Merged

Refactor MeteredEmbeddingProvider to be only wrapper, not sub-class, renamed as MeteredEmbeddingProviderWrapper#2397
tatu-at-datastax merged 5 commits intomainfrom
tatu/refactor-metered-embedding-provider

Conversation

@tatu-at-datastax
Copy link
Contributor

@tatu-at-datastax tatu-at-datastax commented Feb 17, 2026

What this PR does:

Refactor MeteredEmbeddingProvider so it is no longer a sub-class of EmbeddingProvider (because it really isn't sub-type); leaving as a wrapper. Also renamed as MeteredEmbeddingProviderWrapper (but can further rename with better name).

Which issue(s) this PR fixes:
N/A

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CLA Signed: DataStax CLA

@github-actions
Copy link
Contributor

📉 Unit Test Coverage Delta vs Main Branch

Metric Value
Main Branch 50.29%
This PR 50.28%
Delta 🔴 -0.00%
⚠️ Coverage decreased

@github-actions
Copy link
Contributor

Unit Test Coverage Report

Overall Project 50.28% -0.01% 🍏
Files changed 81.94% 🍏

File Coverage
MeteredEmbeddingProviderWrapper.java 97.22% -0.79% 🍏
DataVectorizer.java 50.99% -0.23% 🍏
DataVectorizerService.java 0% -1.54%

@github-actions
Copy link
Contributor

📈 Integration Test Coverage Delta vs Main Branch (dse69-it)

Metric Value
Main Branch 70.74%
This PR 70.74%
Delta 🟢 +0.00%
✅ Coverage improved!

@github-actions
Copy link
Contributor

Integration Test Coverage Report (dse69-it)

Overall Project 70.74% -0.01% 🍏
Files changed 87.5% 🍏

File Coverage
MeteredEmbeddingProviderWrapper.java 97.22% -0.79% 🍏
DataVectorizer.java 39.95% -0.81%
DataVectorizerService.java 22.79% 🍏

@github-actions
Copy link
Contributor

📈 Integration Test Coverage Delta vs Main Branch (hcd-it)

Metric Value
Main Branch 72.49%
This PR 72.49%
Delta 🟢 +0.00%
✅ Coverage improved!

@github-actions
Copy link
Contributor

Integration Test Coverage Report (hcd-it)

Overall Project 72.49% -0.01% 🍏
Files changed 87.5% 🍏

File Coverage
MeteredEmbeddingProviderWrapper.java 97.22% -0.79% 🍏
DataVectorizer.java 39.95% -0.81%
DataVectorizerService.java 22.79% 🍏

@tatu-at-datastax tatu-at-datastax marked this pull request as ready for review February 17, 2026 02:24
@tatu-at-datastax tatu-at-datastax requested a review from a team as a code owner February 17, 2026 02:24
@tatu-at-datastax tatu-at-datastax changed the title Refactor MeteredEmbeddingProvider to be only wrapper, not sub-class (to be renamed) Refactor MeteredEmbeddingProvider to be only wrapper, not sub-class, renamed as MeteredEmbeddingProviderWrapper Feb 17, 2026
private static final Logger LOGGER = LoggerFactory.getLogger(MeteredEmbeddingProvider.class);

private static final String UNKNOWN_TENANT_ID = "unknown";
public class MeteredEmbeddingProviderWrapper {
Copy link
Contributor

Choose a reason for hiding this comment

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

Agree, and as discussed ultimately we should look at refactoring so a class like this just has methods to record the metrics and it's up the Provider to know what and when to record them.

@tatu-at-datastax tatu-at-datastax merged commit 3c55f0e into main Feb 17, 2026
3 checks passed
@tatu-at-datastax tatu-at-datastax deleted the tatu/refactor-metered-embedding-provider branch February 17, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments