René's URL Explorer Experiment


Title: [8.x] Backport manual Logs and Metrics API ungating without changing automatic collection · Issue #6170 · getsentry/sentry-java · GitHub

Open Graph Title: [8.x] Backport manual Logs and Metrics API ungating without changing automatic collection · Issue #6170 · getsentry/sentry-java

X Title: [8.x] Backport manual Logs and Metrics API ungating without changing automatic collection · Issue #6170 · getsentry/sentry-java

Description: Goal Ship the manual-API portion of the Logs/Metrics enable-flag work in an 8.x minor release, without waiting for v9 or backporting its public API removal / integration-default changes. Explicit calls to Sentry.logger() and Sentry.metri...

Open Graph Description: Goal Ship the manual-API portion of the Logs/Metrics enable-flag work in an 8.x minor release, without waiting for v9 or backporting its public API removal / integration-default changes. Explicit c...

X Description: Goal Ship the manual-API portion of the Logs/Metrics enable-flag work in an 8.x minor release, without waiting for v9 or backporting its public API removal / integration-default changes. Explicit c...

Opengraph URL: https://github.com/getsentry/sentry-java/issues/6170

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[8.x] Backport manual Logs and Metrics API ungating without changing automatic collection","articleBody":"## Goal\n\nShip the manual-API portion of the Logs/Metrics enable-flag work in an **8.x minor release**, without waiting for v9 or backporting its public API removal / integration-default changes.\n\nExplicit calls to `Sentry.logger()` and `Sentry.metrics()` must be captured even when `options.getLogs().setEnabled(false)` or `options.getMetrics().setEnabled(false)` is configured, subject to normal SDK enablement, filtering and transport behavior.\n\nKeep the existing public options and their defaults in 8.x. Preserve existing automatic-collection behavior; in particular, removing a manual-API gate must not turn on framework/library log forwarding for users who disabled it.\n\n## Code inspected\n\nStatic inspection of tag **8.58.0**, current `main` **b59e639f5ae48357f55171f8f5ac69f008c6f505**, and open stack tip #5970 at **8eeaffb01e46cf69547da80a3fe7d4480854e775**. No implementation or runtime tests performed for this issue.\n\nAt inspection time, `main` reports `versionName=8.58.0`; no literal `8.x` branch was found. Target the maintained 8.x release line / branch selected by maintainers.\n\n### 1. There are two gates, not just the public API checks\n\n- [LoggerApi](https://github.com/getsentry/sentry-java/blob/8.58.0/sentry/src/main/java/io/sentry/logger/LoggerApi.java#L98-L114) checks `options.getLogs().isEnabled()`.\n- [MetricsApi](https://github.com/getsentry/sentry-java/blob/8.58.0/sentry/src/main/java/io/sentry/metrics/MetricsApi.java#L113-L130) checks `options.getMetrics().isEnabled()`.\n- [SentryClient constructor](https://github.com/getsentry/sentry-java/blob/8.58.0/sentry/src/main/java/io/sentry/SentryClient.java#L63-L74) installs `NoOpLoggerBatchProcessor` / `NoOpMetricsBatchProcessor` when the flags are false.\n\nDeleting only the API checks would still silently discard the items. Real batch processors must be available independently of these flags, while preserving custom factory behavior.\n\n### 2. Android Timber needs a compatibility guard\n\n[8.58.0 SentryTimberTree.addLog](https://github.com/getsentry/sentry-java/blob/8.58.0/sentry-android-timber/src/main/java/io/sentry/android/timber/SentryTimberTree.kt#L242-L264) checks the log level but then calls `scopes.logger().log(...)` without its own enable-flag check. It currently relies on the core gate.\n\nUngating the core alone would allow Timber to start sending Logs even with the legacy logs flag false. Preserve 8.x behavior by guarding automatic Timber forwarding at the integration boundary (reading the current option, rather than freezing a potentially premature value). Do not gate direct user calls again.\n\nLogback, Log4j2, JUL and SentryLogcatAdapter already contain local Logs enable checks in the inspected code; retain and test them. Include Spring Boot auto-wiring. Check mixed-artifact compatibility: upgrading core while leaving an older Timber integration installed can bypass a fix that lives only in the new Timber artifact; document/enforce aligned versions or explicitly address this case.\n\n### 3. Avoid unnecessary worker activity\n\nThe existing batch processors schedule work from `flush()` and restarting `close()` even if no items were accepted. Once processors are created unconditionally, this can start previously absent worker threads for SDK users who never call these APIs. Evaluate the narrowly scoped protections from #5952 and #5957 and test empty flush/restart/close as well as normal batching/concurrency.\n\n## Implementation approach\n\nAdapt the relevant behavior from #5947 (Logs) and #5953 (Metrics), rather than wholesale cherry-picking the v9 stack. Preserve the 8.x `Logs` / `Metrics` enable accessors, defaults, external configuration, Android manifest and Spring property binding. Keep automatic log gating at integration boundaries. Leave public option removal, new required integration opt-ins, and warnings saying the legacy log setting is entirely ignored to the major release.\n\nRelated Timber work: #5943 and #5964. Full stack reference: #5970.\n\n## Acceptance criteria\n\n- [ ] Direct Logs calls work with the Logs flag omitted, true and false; direct Metrics calls work with the Metrics flag true and false.\n- [ ] Tests cover the real `SentryClient` / batch-processor / transport path, not only mocked `ISentryClient` API calls.\n- [ ] Entire SDK disabled / uninitialized / closed behavior remains unchanged; before-send callbacks and other normal delivery controls still apply.\n- [ ] No automatic Logs from Timber, Logcat, Logback, Log4j2, JUL or Spring Boot when the legacy Logs flag is false; existing true behavior, breadcrumbs and error capture are preserved.\n- [ ] Any automatic metric producers on the target line are audited so manual ungating does not opt them in implicitly.\n- [ ] No unused-worker regression on empty flush, close or SDK reinitialization; normal flush/shutdown, queue limits and custom batch-processor factories continue working.\n- [ ] Public API/binary compatibility and existing config binding remain intact in 8.x; mixed-version Timber/core behavior is explicitly addressed.\n- [ ] Changelog and docs explain the intentional minor-release behavior change: manual API calls no longer honor the telemetry kill switches, but automatic logging still honors the legacy setting in 8.x. Explain before-send filtering for users who need to drop manually emitted telemetry.\n\n## Tracking\n\nRelated umbrella issues: #5364 (Java), #5363 (Android). This issue is specifically the **8.x minor-compatible manual-API backport**, not a replacement for the major-transition work. Focused GitHub and Linear searches did not find a dedicated backport ticket.","author":{"url":"https://github.com/apps/sentry-junior","@type":"Person","name":"sentry-junior"},"datePublished":"2026-09-28T05:55:58Z","url":"https://github.com/getsentry/sentry-java/issues/6170"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:599e7480-caf6-ce49-6b0d-6f0c22e98759
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC582:2375C9:138432:1B32C0:6B046F9E
html-safe-nonced52360779f3be5a3ea49135b597e337ffd3ed1546a95d36b2e80463f613c5e25
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTgyOjIzNzVDOToxMzg0MzI6MUIzMkMwOjZCMDQ2RjlFIiwidmlzaXRvcl9pZCI6IjM1MDI5MjU1MDI0OTc0NTE5MzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac55f622cf60067bb438715ef0ebeee2843c6ca5e8e316dfd5be68bdd9342d365d
hovercard-subject-tagissue:5610042853
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-java/6170/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0ba3d3c85e019e0e55b30f90aafc87405704fee5e20f34906994de4094543064/getsentry/sentry-java/issues/6170
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0ba3d3c85e019e0e55b30f90aafc87405704fee5e20f34906994de4094543064/getsentry/sentry-java/issues/6170
og:image:altGoal Ship the manual-API portion of the Logs/Metrics enable-flag work in an 8.x minor release, without waiting for v9 or backporting its public API removal / integration-default changes. Explicit c...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesentry-junior[bot]
hostnamegithub.com
expected-hostnamegithub.com
Noneae8802492f12d3ba4f6b0d814054e617a2a5616b6327bf8555c10cd5b0dc2a6f
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-java git https://github.com/getsentry/sentry-java.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3368190
octolytics-dimension-repository_nwogetsentry/sentry-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3368190
octolytics-dimension-repository_network_root_nwogetsentry/sentry-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecfb5f24c6e01d85f70804652a5107e5cac03a161
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-java/issues/6170#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-java%2Fissues%2F6170
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-java%2Fissues%2F6170
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-java
Reloadhttps://github.com/getsentry/sentry-java/issues/6170
Reloadhttps://github.com/getsentry/sentry-java/issues/6170
Reloadhttps://github.com/getsentry/sentry-java/issues/6170
getsentryhttps://github.com/getsentry
sentry-javahttps://github.com/getsentry/sentry-java
Codehttps://github.com/getsentry/sentry-java
Issues266 (266)https://github.com/getsentry/sentry-java/issues
Pull requests57 (57)https://github.com/getsentry/sentry-java/pulls
Discussionshttps://github.com/getsentry/sentry-java/discussions
Actionshttps://github.com/getsentry/sentry-java/actions
Projectshttps://github.com/getsentry/sentry-java/projects
Security and quality2 (2)https://github.com/getsentry/sentry-java/security
Insightshttps://github.com/getsentry/sentry-java/insights
https://github.com/getsentry/sentry-java
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-java/issues/6170
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-java/issues/6170
#6184https://github.com/getsentry/sentry-java/pull/6184
[8.x] Backport manual Logs and Metrics API ungating without changing automatic collectionhttps://github.com/getsentry/sentry-java/issues/6170#top
#6184https://github.com/getsentry/sentry-java/pull/6184
https://github.com/adinauer
Logshttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22Logs%22
Platform: Javahttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22Platform%3A%20Java%22
Taskhttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22Task%22
https://github.com/apps/sentry-junior
sentry-juniorhttps://github.com/apps/sentry-junior
on Sep 28, 2026https://github.com/getsentry/sentry-java/issues/6170#issue-5610042853
b59e639https://github.com/getsentry/sentry-java/commit/b59e639f5ae48357f55171f8f5ac69f008c6f505
#5970https://github.com/getsentry/sentry-java/pull/5970
8eeaffbhttps://github.com/getsentry/sentry-java/commit/8eeaffb01e46cf69547da80a3fe7d4480854e775
LoggerApihttps://github.com/getsentry/sentry-java/blob/8.58.0/sentry/src/main/java/io/sentry/logger/LoggerApi.java#L98-L114
MetricsApihttps://github.com/getsentry/sentry-java/blob/8.58.0/sentry/src/main/java/io/sentry/metrics/MetricsApi.java#L113-L130
SentryClient constructorhttps://github.com/getsentry/sentry-java/blob/8.58.0/sentry/src/main/java/io/sentry/SentryClient.java#L63-L74
8.58.0 SentryTimberTree.addLoghttps://github.com/getsentry/sentry-java/blob/8.58.0/sentry-android-timber/src/main/java/io/sentry/android/timber/SentryTimberTree.kt#L242-L264
#5952https://github.com/getsentry/sentry-java/pull/5952
#5957https://github.com/getsentry/sentry-java/pull/5957
#5947https://github.com/getsentry/sentry-java/pull/5947
#5953https://github.com/getsentry/sentry-java/pull/5953
#5943https://github.com/getsentry/sentry-java/pull/5943
#5964https://github.com/getsentry/sentry-java/pull/5964
#5970https://github.com/getsentry/sentry-java/pull/5970
#5364https://github.com/getsentry/sentry-java/issues/5364
#5363https://github.com/getsentry/sentry-java/issues/5363
https://github.com/apps/linear-code
linear-codehttps://github.com/apps/linear-code
on Sep 28, 2026https://github.com/getsentry/sentry-java/issues/6170#issuecomment-5864307055
Linear Codehttps://linear.app
JAVA-747https://linear.app/getsentry/issue/JAVA-747
github-actionshttps://github.com/apps/github-actions
Platform: Javahttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22Platform%3A%20Java%22
on Sep 28, 2026https://github.com/getsentry/sentry-java/issues/6170#event-31966930630
linear-codehttps://github.com/apps/linear-code
Taskhttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22Task%22
Logshttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22Logs%22
on Sep 28, 2026https://github.com/getsentry/sentry-java/issues/6170#event-31966945663
linear-codehttps://github.com/apps/linear-code
adinauerhttps://github.com/adinauer
on Sep 28, 2026https://github.com/getsentry/sentry-java/issues/6170#event-31989997557
adinauerhttps://github.com/adinauer
completedhttps://github.com/getsentry/sentry-java/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#6184https://github.com/getsentry/sentry-java/pull/6184
on Oct 1, 2026https://github.com/getsentry/sentry-java/issues/6170#event-32222970756
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Oct 1, 2026https://github.com/getsentry/sentry-java/issues/6170#issuecomment-5926297253
GitHub Actionshttps://help.github.com/en/actions
#6184https://github.com/getsentry/sentry-java/pull/6184
8.59.0 releasehttps://github.com/getsentry/sentry-java/releases/tag/8.59.0
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-java/issues/6170
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-java/issues/6170
adinauerhttps://github.com/adinauer
Logshttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22Logs%22
Platform: Javahttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22Platform%3A%20Java%22
Taskhttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22Task%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.