Skip to content

fix(telemetry): report current meter scope version#451

Merged
yordis merged 2 commits into
masterfrom
yordis/fix-telemetry-meter-scope-version
Jul 20, 2026
Merged

fix(telemetry): report current meter scope version#451
yordis merged 2 commits into
masterfrom
yordis/fix-telemetry-meter-scope-version

Conversation

@yordis

@yordis yordis commented Jul 20, 2026

Copy link
Copy Markdown
Member
  • Telemetry consumers need instrumentation scope metadata to identify the release that produced each metric stream.
  • A stale scope version obscures release correlation across core and projection diagnostics.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@cursor

cursor Bot commented Jul 20, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Telemetry metadata-only change with no metric names or collection logic altered; startup fails only if informational version is missing.

Overview
OpenTelemetry instrumentation scope version now reflects the running server build instead of a fixed 1.0.0.

A shared TelemetryMeterFactory derives the scope version from the assembly informational version (dropping any + build suffix) and validates scope names. Core and projections metric bootstrap paths use this factory for their meters.

Unit tests cover version alignment and rejection of null/empty/whitespace scope names.

Reviewed by Cursor Bugbot for commit 3ec0086. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yordis, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 44 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 19faef0a-17d1-4e25-9aa2-43f36b179cc0

📥 Commits

Reviewing files that changed from the base of the PR and between b47026e and 3ec0086.

📒 Files selected for processing (2)
  • src/EventStore.Core.XUnit.Tests/OpenTelemetry/TelemetryMeterFactoryTests.cs
  • src/EventStore.Core/Diagnostics/TelemetryMeterFactory.cs

Walkthrough

A shared TelemetryMeterFactory now validates instrumentation scope names and creates versioned meters. Core and projection metrics use the factory instead of direct Meter construction, with tests covering naming, versioning, and invalid inputs.

Changes

Telemetry meter standardization

Layer / File(s) Summary
Meter factory contract and tests
src/EventStore.Core/Diagnostics/TelemetryMeterFactory.cs, src/EventStore.Core.XUnit.Tests/OpenTelemetry/TelemetryMeterFactoryTests.cs
Adds validated meter creation using the instrumentation scope and VersionInfo.Version, with tests for valid and missing scope names.
Core and projection metrics integration
src/EventStore.Core/MetricsBootstrapper.cs, src/EventStore.Projections.Core/ProjectionsSubsystem.cs
Routes core and projection meter initialization through TelemetryMeterFactory.Create.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

A rabbit hops through metrics bright,
Naming each meter just right.
Versions tucked in every ear,
Empty scopes vanish, crystal clear.
Core and projections share the cheer!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the change to report the current meter scope version for telemetry.
Description check ✅ Passed The description is directly related to updating telemetry scope metadata and release correlation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch yordis/fix-telemetry-meter-scope-version

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis
yordis merged commit 198b648 into master Jul 20, 2026
23 checks passed
@yordis
yordis deleted the yordis/fix-telemetry-meter-scope-version branch July 20, 2026 19:16
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.

1 participant