Skip to content

Fix #2541: use UserAgent from RequestContext for the metrics tag - #2543

Open
erichare wants to merge 5 commits into
mainfrom
fix/2541-user-agent-metric-tag
Open

Fix #2541: use UserAgent from RequestContext for the metrics tag#2543
erichare wants to merge 5 commits into
mainfrom
fix/2541-user-agent-metric-tag

Conversation

@erichare

@erichare erichare commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What this PR does:

TenantRequestMetricsTagProvider was splitting the User-Agent header itself, it now uses UserAgent.product() from the RequestContext so the processing stays in the one place. When there is no RequestContext the tag falls back to the full header string, and to unknown when there is no header.

Which issue(s) this PR fixes:
Fixes #2541

Checklist

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

Falls back to the full header when there is no RequestContext.
@erichare
erichare requested a review from a team as a code owner August 12, 2026 21:26
@erichare
erichare requested a review from amorton August 12, 2026 21:26
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

📈 Unit Test Coverage Delta vs Main Branch

Metric Value
Main Branch 53.42%
This PR 53.60%
Delta 🟢 +0.18%
✅ Coverage improved!

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Unit Test Coverage Report

Overall Project 53.6% -0.02% 🍏
Files changed 0%

File Coverage
TenantRequestMetricsTagProvider.java 0% -22.67%

@erichare
erichare marked this pull request as draft August 12, 2026 21:47
@erichare
erichare removed request for a team and amorton August 12, 2026 21:47
@erichare
erichare requested a review from amorton August 12, 2026 22:11
@erichare
erichare marked this pull request as ready for review August 12, 2026 22:11
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

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

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

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (dse69-it)

Overall Project 71.49% -0.02% 🍏
Files changed 0%

File Coverage
TenantRequestMetricsTagProvider.java 53.85% -21.79%

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

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

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

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (hcd-it)

Overall Project 72.81% -0.02% 🍏
Files changed 0%

File Coverage
TenantRequestMetricsTagProvider.java 53.85% -21.79%

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.

Update TenantRequestMetricsTagProvider to use the UserAgent on RequestContext

1 participant