Teams often leave an observability feature switched off in config and assume nothing is sent. Then a library upgrade changes the rule, and data starts flowing that nobody planned for. The first sign is usually a bigger bill or a privacy question from legal.
Sentry Java 8.59.0, released on 4 November 2026, includes a breaking change of exactly this kind. Direct calls to Sentry.logger() and Sentry.metrics() are now captured whatever the logs and metrics enable options say. The release also deprecates sendDefaultPii in favour of dataCollection, which is covered in our PII post.
If your code already calls these APIs while the options are off, you may have been silently dropping data. After the upgrade, that data is sent. That could be useful or unwelcome, so measure it.
Data Points to Track
log_events_per_sessionbefore and after the upgrademetric_events_per_sessionbefore and after the upgradelog_leveldistribution (debug, info, warn, error)logs_option_enabledandmetrics_option_enabledas configureddirect_call_sites, the number ofSentry.logger()andSentry.metrics()calls in the codesentry_java_versionandapp_versionpayload_bytes_per_sessionfor logs and metricssensitive_attribute_hits, any log or metric attribute that matches a personal data rule
Setup Steps
- Search your codebase for
Sentry.logger()andSentry.metrics()calls and list each one. - Record the current options for logs and metrics in every build variant.
- Decide the intent. For each call site, choose whether it should send data. If not, remove the call or guard it.
- Upgrade to 8.59.0 or later in a staging build and watch volume for a day.
- Compare payload size and event counts with the previous version.
- Scrub attributes that could hold names, emails or identifiers before they leave the device.
- Set a volume alert so a sudden jump in logs or metrics is flagged within hours.
Actionable Insights
A sharp rise in log volume after the upgrade tells you the old option was hiding calls. Review those call sites one by one. Some are valuable and should stay. Others are leftover debug lines that should go.
Look at the level mix. If most events are debug, filter them in production and keep warn and error. Smaller streams are cheaper and easier to read.
Check attributes carefully. Developers often log a user id or an email to help debugging. When logs become visible to a wider team, that habit becomes a privacy risk. Treat any hit on your sensitive attribute check as a bug to fix before release.
Finally, connect volume to cost. If metrics add little decision value, remove them. Data nobody reads is only a liability.
Common Mistakes to Avoid
Do not assume an option set to false blocks every path. Test the real behaviour after each major SDK change, and read the breaking-change section of release notes before you merge a dependency bump.
Do not roll out to all users at once. A staged rollout gives you a chance to catch noisy call sites while the audience is small.