FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(spring): [Logs and Metrics Enable Flags 15] Warn for legacy Metrics property by adinauer · Pull Request #5956 · getsentry/sentry-java · GitHub

feat(spring): [Logs and Metrics Enable Flags 15] Warn for legacy Metrics property - #5956

Open
adinauer wants to merge 3 commits into
feat/warn-legacy-metrics-externalfrom
feat/warn-legacy-metrics-spring
Open

feat(spring): [Logs and Metrics Enable Flags 15] Warn for legacy Metrics property#5956
adinauer wants to merge 3 commits into
feat/warn-legacy-metrics-externalfrom
feat/warn-legacy-metrics-spring

Conversation

adinauer commented Aug 13, 2026
edited
Loading

Copy link
Copy Markdown
Member

PR Stack (Logs and Metrics Enable Flags)


📜 Description

Detects explicit sentry.metrics.enabled configuration through Spring's Environment in all three Spring Boot variants. Migration warnings are emitted after Sentry.init, when the diagnostic logger has been initialized.

Both true and false values emit tailored migration warnings. The obsolete property is not added back to SentryProperties and does not affect manual Metrics capture. Absent configuration emits no warning.

💡 Motivation and Context

After removal of the aggregate Metrics option, Spring's relaxed binder ignores the old property. Inspecting the complete Spring Environment preserves a useful migration diagnostic across property files, YAML, environment variables, command-line values, and other property sources.

💚 How did you test it?

  • ./gradlew :sentry-spring-boot:test :sentry-spring-boot-jakarta:test :sentry-spring-boot-4:test
  • ./gradlew spotlessApply apiDump
  • Added absent, explicit true, and explicit false tests to all three Spring Boot variants

📝 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.

🔮 Next steps

Avoid starting the Metrics batch worker thread until the first accepted Metrics item.

#skip-changelog

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

Inspect the Spring Environment before SDK initialization and emit tailored migration warnings for explicit sentry.metrics.enabled values without binding or applying the obsolete property.

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

github-actions Bot commented Aug 13, 2026
edited
Loading

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 532ecf2

sentry Bot commented Aug 13, 2026
edited
Loading

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-android Build Distribution Settings

Copy link
Copy Markdown
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 320.24 ms 363.04 ms 42.80 ms
Size 0 B 0 B 0 B

…y-metrics-spring

# Conflicts:
#	sentry-spring-boot-4/src/main/java/io/sentry/spring/boot4/SentryAutoConfiguration.java
#	sentry-spring-boot-jakarta/src/main/java/io/sentry/spring/boot/jakarta/SentryAutoConfiguration.java
#	sentry-spring-boot/src/main/java/io/sentry/spring/boot/SentryAutoConfiguration.java
.getLogger()
.log(
SentryLevel.WARNING,
"The 'sentry.metrics.enabled' property is no longer supported. Manual "

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

That string is duplicated all over the place, should we create a constant for it?

.getLogger()
.log(
SentryLevel.WARNING,
"The 'sentry.metrics.enabled' property no longer disables manual "

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

That string is duplicated all over the place, should we create a constant for it?

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL