Repository navigation
Commit 48e97fb
feat(core): Remove Logs and Metrics enable flags (#5939)
* collection: logs and metrics enable flags
* feat(logback): Add Logs opt-in
Require an explicit Logback appender opt-in before forwarding records as Sentry Logs. Keep event and breadcrumb capture independent while the aggregate core Logs flag remains in place.
Co-Authored-By: Claude <noreply@anthropic.com>
* changelog
* feat(log4j2): Add Logs opt-in
Require an explicit Log4j2 appender opt-in before forwarding records as Sentry Logs. Preserve existing constructors and factory methods with Logs disabled by default while keeping events and breadcrumbs unchanged.
Co-Authored-By: Claude <noreply@anthropic.com>
* changelog
* feat(jul): Add Logs opt-in
Require an explicit JUL handler opt-in before forwarding records as Sentry Logs. Support Java and LogManager configuration while keeping event and breadcrumb capture unchanged.
Co-Authored-By: Claude <noreply@anthropic.com>
* changelog
* feat(android): Add Timber Logs opt-in
Require an explicit Timber-local opt-in before forwarding Timber messages as Sentry Logs. Add Android options and manifest configuration for auto-installed integrations while preserving event and breadcrumb capture.
Co-Authored-By: Claude <noreply@anthropic.com>
* changelog
* feat(android): Add Logcat Logs opt-in
Require an explicit Android option before forwarding Logcat calls as Sentry Logs. Support Java and manifest configuration while keeping breadcrumbs and Android Log calls unchanged.
Co-Authored-By: Claude <noreply@anthropic.com>
* changelog
* feat(spring): Add logging Logs opt-in
Add a Spring Boot logging property that controls Sentry Logs forwarding from auto-configured Logback appenders. Keep appender installation, events, and breadcrumbs independent from the new opt-in.
Co-Authored-By: Claude <noreply@anthropic.com>
* changelog
* feat(core): Remove Logs enable flag
Capture manual Sentry Logs without an aggregate enable option and always create the configured logger batch processor. Keep automatic logging integrations controlled by their local opt-ins and remove legacy Logs configuration from active samples and fixtures.
Co-Authored-By: Claude <noreply@anthropic.com>
* changelog
* feat(android): Warn for legacy Logs metadata
Detect explicit io.sentry.logs.enabled Android manifest metadata and emit tailored migration warnings without changing the integration-local Logs options.
Co-Authored-By: Claude <noreply@anthropic.com>
* feat(core): Warn for legacy Logs configuration
Keep parsing the nullable logs.enabled external option and emit tailored migration warnings for explicit true and false values without changing manual Logs capture.
Co-Authored-By: Claude <noreply@anthropic.com>
* feat(spring): Warn for legacy Logs property
Inspect the Spring Environment before SDK initialization and emit tailored migration warnings for explicit sentry.logs.enabled values without binding or applying the obsolete property.
Co-Authored-By: Claude <noreply@anthropic.com>
* perf(core): Avoid unused Logs worker thread
Track whether the logger batch processor has accepted an item and skip empty flush and restart-close scheduling until then. This prevents SDK initialization and Android background callbacks from starting a worker thread when Logs are unused.
Co-Authored-By: Claude <noreply@anthropic.com>
* feat(core): Remove Metrics enable flag
Capture manual Metrics without an aggregate option and always create the configured batch processor. Keep legacy external and Android keys only for subsequent migration warnings.
Co-Authored-By: Claude <noreply@anthropic.com>
* feat(android): Warn for legacy Metrics metadata
Detect explicit io.sentry.metrics.enabled manifest values and emit tailored migration warnings without applying the obsolete option.
Co-Authored-By: Claude <noreply@anthropic.com>
* feat(core): Warn for legacy Metrics configuration
Emit tailored migration warnings for explicit metrics.enabled values while preserving manual Metrics capture regardless of the obsolete setting.
Co-Authored-By: Claude <noreply@anthropic.com>
* feat(spring): Warn for legacy Metrics property
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>
* perf(core): Start Metrics batch worker on first use
Avoid scheduling Metrics processor work for empty flush and close operations until the processor accepts its first item. Preserve existing batching, restart, and Android background behavior after first use.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(jul): Preserve null-message events and breadcrumbs
Skip only Sentry Logs conversion when a valid JUL record has no message, allowing its event and breadcrumb capture paths to continue.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(samples): Remove obsolete Logback Logs option
Keep the integration-local enableLogs setting while removing the aggregate Logs configuration that no longer exists.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(core): Keep Metrics test constructor internal
Use package visibility for executor injection so the test-only constructor does not expand the published API.
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: Update options guidance for Logs and Metrics
Document always-available deliberate APIs, source-local automatic Logs opt-ins, and warning-only handling of obsolete aggregate settings.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(android): Read Timber Logs option after configuration
Resolve the auto-installed Timber integration's Logs opt-in lazily when the integration registers. This honors programmatic configuration and manifest overrides applied after default integrations are constructed.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(spring): Warn after SDK initialization
Emit legacy Logs property diagnostics after Sentry.init so the configured diagnostic logger is available.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(core): Make enable-flag warnings visible
Initialize the fatal logger before external configuration is merged and route legacy Logs and Metrics migration warnings through the always-visible startup logger across core, Android, and Spring Boot.
Co-Authored-By: Claude <noreply@anthropic.com>
* ref(logging): Rename Logs opt-ins
Use state-oriented names for the new Logback, Log4j2, JUL, Timber, Logcat, and Spring Boot Logs controls. Expose get...Enabled accessors so Java-defined options map to natural Kotlin properties before these APIs are released.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(android): Use manifest metadata lookup helper
Keep legacy Logs metadata detection compatible with both Android bundles and injected metadata maps after merging the v9 branch.
* fix(android): Use metadata helper for legacy Metrics option
Keep legacy Metrics metadata detection compatible with both Android bundles and injected metadata maps after merging the v9 branch.
* ref(core): Remove legacy Logs warning inputs
Remove obsolete external and Android manifest parsing retained only for
migration warnings that will not ship in v9.
Co-Authored-By: Claude <noreply@anthropic.com>
* ref(android): Remove legacy Logs metadata warnings
Drop the warning-only behavior so the PR is neutral before removal from the v9 stack.
Co-Authored-By: Claude <noreply@anthropic.com>
* ref(core): Remove legacy Logs configuration warnings
Drop the warning-only behavior so the PR is neutral before removal from the v9 stack.
Co-Authored-By: Claude <noreply@anthropic.com>
* ref(spring): Remove legacy Logs property warnings
Drop the warning-only behavior so the PR is neutral before removal from the v9 stack.
Co-Authored-By: Claude <noreply@anthropic.com>
* ref(core): Remove legacy Metrics warning inputs
Remove obsolete external and Android manifest parsing retained only for
migration warnings that will not ship in v9.
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: Remove legacy enable-flag warning guidance
Document the removed aggregate options without retaining warning-only migration behavior.
Co-Authored-By: Claude <noreply@anthropic.com>
* test(logback): Use renamed Logs option
Update the remaining fixture call to use logsEnabled so the renamed API compiles.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(spring): Forward Logs option to Log4j2 appender
Pass the Spring logging Logs opt-in to auto-configured Log4j2 appenders in the Jakarta and Spring Boot 4 integrations. Keep automatic Logs disabled unless the property is explicitly enabled.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(spring): Use renamed Logs option in Log4j2 wiring
Keep the newly added Log4j2 auto-configuration wiring aligned with the logsEnabled accessor and Spring property introduced by this branch.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(jul): Handle null messages with resource bundles
Skip resource-bundle lookup and message formatting when a JUL record has no message. Preserve event and breadcrumb capture instead of aborting with a null-pointer exception.
Co-Authored-By: Claude <noreply@anthropic.com>
* test(jul): Use renamed Logs option in regression test
Keep the null-message resource-bundle regression test aligned with the logsEnabled fixture option introduced by this branch.
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(options): Clarify conditional signal options
State that options such as sampling should only be added when the signal supports them. Avoid implying that Logs and Metrics currently expose sampling controls.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(timber): Keep lazy logs constructor internal
Hide the lazy evaluator constructor from the supported Kotlin API while
retaining Java access for Android integration wiring. Use a lambda instead
of a method reference for compatibility with older Android Gradle plugins.
Co-Authored-By: Claude <noreply@anthropic.com>
* ref(android): Clarify automatic log capture option names
Rename the Timber and Logcat options to make it explicit that they
control capture into Sentry rather than output to those logging systems.
Keep natural property syntax for Kotlin callers and align tests and
guidance with the new names.
Co-Authored-By: Claude <noreply@anthropic.com>
* ref(logging)!: Add opt-in flags to existing constructors
Add the Logs opt-in directly to the existing Log4j2 and Timber
constructor signatures instead of retaining compatibility overloads.
Document the intentional v9 API changes in the changelog.
BREAKING CHANGE: Log4j2 and Timber callers using explicit constructor
signatures must pass the new Logs opt-in argument.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(samples): Use Spring logging Logs option
Keep structured Logs enabled in the Spring Boot Log4j2 samples after removing the aggregate Logs configuration.
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(changelog): Clarify Logs and Metrics migration
Classify removal of the aggregate options as breaking changes and list the source-specific opt-ins for automatic Logs capture.
Co-Authored-By: Claude <noreply@anthropic.com>
* ref(timber)!: Require explicit Logs opt-in
Replace the no-argument SentryTimberIntegration constructor with a
boolean overload so manually installed integrations must choose whether
to forward Sentry Logs.
Keep the lazy evaluator path for auto-installed integrations and clarify
the separate Android option and constructor configuration paths.
BREAKING CHANGE: SentryTimberIntegration() now requires a logsEnabled argument.
Co-Authored-By: Claude <noreply@anthropic.com>
* ref(logging): Remove unused no-op Logs processor
Remove the internal no-op batch processor now that SentryClient always
creates the configured Logs processor and no SDK path selects the stub.
Co-Authored-By: Claude <noreply@anthropic.com>
* ref(metrics): Remove unused no-op batch processor
Remove the internal no-op batch processor now that SentryClient always
creates the configured Metrics processor and no SDK path selects the stub.
Co-Authored-By: Claude <noreply@anthropic.com>
* ref(log4j2)!: Remove deprecated appender constructor
Remove the constructor superseded by the minimumLevel overload in 8.16.0
at the v9 breaking-change boundary.
Co-Authored-By: Claude <noreply@anthropic.com>
* ref(android): Align log capture manifest option names
Rename the Timber and Logcat manifest options to describe Sentry's log
capture direction consistently with their Android option accessors.
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(changelog): Name Logs integration opt-ins
List the exact option, property, attribute, and manifest names for every logging integration so users can enable the intended source after upgrading.
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(changelog): Consolidate Logs migration guidance
Lead with removal of the aggregate Logs and Metrics flags, list every source-local Logs opt-in, and keep constructor migrations as secondary details.
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(changelog): Prioritize Spring Boot Logs opt-in
List the Spring Boot logging property first among the source-local Logs controls.
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(changelog): Link Logs flags collection PR
Reference the collection PR from the consolidated breaking-change entry.
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(changelog): Clarify removed telemetry options
List every configuration surface affected by the aggregate Logs and
Metrics option removal and structure the migration guidance clearly.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent ff64ada commit 48e97fb
86 files changed
Lines changed: 1226 additions & 520 deletions
File tree
- .cursor/rules
- sentry-android-core
- api
- src
- main/java/io/sentry/android/core
- test/java/io/sentry/android/core
- sentry-android-timber
- api
- src
- main/java/io/sentry/android/timber
- test/java/io/sentry/android/timber
- sentry-jul
- api
- src
- main/java/io/sentry/jul
- test
- kotlin/io/sentry/jul
- resources
- sentry-log4j2
- api
- src
- main/java/io/sentry/log4j2
- test
- kotlin/io/sentry/log4j2
- resources
- sentry-logback
- api
- src
- main/java/io/sentry/logback
- test/kotlin/io/sentry/logback
- sentry-samples
- sentry-samples-android/src/main
- sentry-samples-console-otlp/src/main/java/io/sentry/samples/console
- sentry-samples-jul/src/main/resources
- sentry-samples-log4j2/src/main/resources
- sentry-samples-logback/src/main/resources
- sentry-samples-spring-boot-4-log4j2/src/main/resources
- sentry-samples-spring-boot-4-opentelemetry-noagent/src/main/resources
- sentry-samples-spring-boot-4-opentelemetry/src/main/resources
- sentry-samples-spring-boot-4-otlp/src/main/resources
- sentry-samples-spring-boot-4-webflux/src/main/resources
- sentry-samples-spring-boot-4/src/main/resources
- sentry-samples-spring-boot-jakarta-log4j2/src/main/resources
- sentry-samples-spring-boot-jakarta-opentelemetry-noagent/src/main/resources
- sentry-samples-spring-boot-jakarta-opentelemetry/src/main/resources
- sentry-samples-spring-boot-jakarta/src/main/resources
- sentry-samples-spring-boot-opentelemetry-noagent/src/main/resources
- sentry-samples-spring-boot-opentelemetry/src/main/resources
- sentry-samples-spring-boot-webflux-jakarta/src/main/resources
- sentry-samples-spring-boot-webflux/src/main/resources
- sentry-samples-spring-boot/src/main/resources
- sentry-spring-boot-4
- api
- src
- main/java/io/sentry/spring/boot4
- test/kotlin/io/sentry/spring/boot4
- sentry-spring-boot-jakarta
- api
- src
- main/java/io/sentry/spring/boot/jakarta
- test/kotlin/io/sentry/spring/boot/jakarta
- sentry-spring-boot
- api
- src
- main/java/io/sentry/spring/boot
- test/kotlin/io/sentry/spring/boot
- sentry
- api
- src
- main/java/io/sentry
- logger
- metrics
- test/java/io/sentry
- logger
- metrics
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
15 | | - | |
| 18 | + | |
16 | 19 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | | - | |
| 76 | + | |
76 | 77 | | |
77 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
78 | 82 | | |
79 | 83 | | |
80 | 84 | | |
| |||
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
86 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
87 | 95 | | |
88 | | - | |
| 96 | + | |
| 97 | + | |
89 | 98 | | |
90 | 99 | | |
91 | | - | |
| 100 | + | |
92 | 101 | | |
| 102 | + | |
93 | 103 | | |
94 | 104 | | |
95 | 105 | | |
96 | 106 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
101 | 121 | | |
102 | 122 | | |
103 | 123 | | |
| |||
106 | 126 | | |
107 | 127 | | |
108 | 128 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
7 | 38 | | |
8 | 39 | | |
9 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
| 432 | + | |
432 | 433 | | |
433 | 434 | | |
434 | 435 | | |
435 | 436 | | |
436 | 437 | | |
437 | 438 | | |
| 439 | + | |
438 | 440 | | |
439 | 441 | | |
440 | 442 | | |
| |||
498 | 500 | | |
499 | 501 | | |
500 | 502 | | |
| 503 | + | |
501 | 504 | | |
502 | 505 | | |
503 | 506 | | |
504 | 507 | | |
505 | 508 | | |
506 | 509 | | |
507 | 510 | | |
| 511 | + | |
508 | 512 | | |
509 | 513 | | |
510 | 514 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| |||
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
136 | | - | |
137 | 137 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
482 | | - | |
| 482 | + | |
| 483 | + | |
483 | 484 | | |
484 | 485 | | |
485 | 486 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
750 | 750 | | |
751 | 751 | | |
752 | 752 | | |
753 | | - | |
754 | | - | |
755 | | - | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
756 | 759 | | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
761 | 766 | | |
762 | 767 | | |
763 | 768 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
78 | 84 | | |
79 | 85 | | |
80 | 86 | | |
| |||
505 | 511 | | |
506 | 512 | | |
507 | 513 | | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
508 | 530 | | |
509 | 531 | | |
510 | 532 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | | - | |
56 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
60 | 74 | | |
61 | 75 | | |
62 | 76 | | |
| |||
0 commit comments