Skip to content

feat(micrometer): [Micrometer 1] Add active meters - #6085

Draft
adinauer wants to merge 4 commits into
feat/micrometerfrom
feat/micrometer-active-meters
Draft

adinauer wants to merge 4 commits into
feat/micrometerfrom
feat/micrometer-active-meters

Conversation

@adinauer

@adinauer adinauer commented Sep 10, 2026

Copy link
Copy Markdown
Member

PR Stack (Micrometer)


📜 Description

Add the framework-neutral sentry-micrometer module and its public SentryMeterRegistry.

The registry forwards positive counter increments and individual timer and distribution-summary recordings through Sentry.metrics(). It remains a normal Micrometer registry for local reads, defaults to Micrometer's identity naming convention while remaining configurable, applies registry-local filters, converts tags and units to Sentry metric metadata, and coexists with other registries in a composite.

This PR also registers the artifact, SDK integration metadata, package documentation, and release metadata.

💡 Motivation and Context

Micrometer users currently need custom bridge code to send application metrics to Sentry. A dedicated registry lets applications add Sentry as another metrics destination without replacing Prometheus, Datadog, OTLP, or other registries.

This is the first PR in the Micrometer stack. Passive meter polling, FunctionTimer semantics, and Spring Boot auto-configuration follow separately.

💚 How did you test it?

./gradlew spotlessApply apiDump
./gradlew :sentry-micrometer:check

Tests cover active meter forwarding, normal local reads, metadata conversion, filtering, dynamic Sentry scope resolution, failure isolation, lifecycle behavior, and composite-registry coexistence.

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

Add passive gauge, long-task timer, and function-counter polling in the next stack PR.

#skip-changelog

⚠️ Merge this PR using a merge commit (not squash). Only the collection branch is squash-merged into main.

Add a framework-neutral Micrometer registry that forwards counters, timers, and distribution summaries through the existing Sentry metrics API while preserving local meter behavior.

Register the new integration artifact and cover naming, units, filtering, scope resolution, and composite registry coexistence.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against d6adfa8

@sentry

sentry Bot commented Sep 10, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.56.0 (1) release

⚙️ sentry-android Build Distribution Settings

adinauer and others added 3 commits September 17, 2026 16:20
Use Micrometer's dot naming convention by default so exported metric names and tag keys match their instrumented forms. Keep the registry convention configurable for applications that need another format.

Co-Authored-By: Claude <noreply@anthropic.com>
Express the registry's name-preservation contract directly instead of relying on Micrometer's dot alias for the identity convention.

Co-Authored-By: Claude <noreply@anthropic.com>
Deactivate active meter wrappers when Micrometer removes them from the registry. Preserve local meter state while preventing stale handles from sending duplicate metrics after re-registration.

Co-Authored-By: Claude <noreply@anthropic.com>
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