Skip to content

chore: deprecate enable_logs/metrics - #2000

Open
jpnurmi wants to merge 3 commits into
masterfrom
jpnurmi/chore/deprecate-enable-logs-and-metrics
Open

chore: deprecate enable_logs/metrics#2000
jpnurmi wants to merge 3 commits into
masterfrom
jpnurmi/chore/deprecate-enable-logs-and-metrics

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

A softer alternative to #1980, to be released with the current features and fixes. This provides a heads-up for the actual removal coming soon, together with the other upcoming breaking changes (e.g. value-based attachments for RW-locking).

@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.43%. Comparing base (a689095) to head (fdc7b2d).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2000      +/-   ##
==========================================
+ Coverage   74.32%   74.43%   +0.11%     
==========================================
  Files         104      104              
  Lines       25807    25913     +106     
  Branches     4668     4691      +23     
==========================================
+ Hits        19180    19289     +109     
+ Misses       5303     5294       -9     
- Partials     1324     1330       +6     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@limbonaut limbonaut left a comment

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.

The more I think about it, the more I like the previous version, because it's more honest. If someone calls sentry_options_set_enable_logs(options, false) on this version, they'll get a warning, but application will compile and run, and produce a different result than before. It's a sneaky footgun.

Comment thread src/sentry_logs.c Outdated
static sentry_batcher_ref_t g_batcher = SENTRY_BATCHER_REF_INIT;

static bool
sdk_is_initialized(void)

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.

Other SDKs usually provide is_enabled() to check whether it's initialized. Just an idea, and probably out of scope for this PR.

@jpnurmi jpnurmi changed the title ref: deprecate enable_logs/metrics chore: deprecate enable_logs/metrics Aug 19, 2026
@jpnurmi

jpnurmi commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator Author

The more I think about it, the more I like the previous version, because it's more honest. If someone calls sentry_options_set_enable_logs(options, false) on this version, they'll get a warning, but application will compile and run, and produce a different result than before. It's a sneaky footgun.

Good point! A bare deprecation without ripping out the functionality just yet makes more sense, indeed.

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