Skip to content

chore: Drop enable_logs, enable_metrics options in new major - #7178

Merged
sentrivana merged 5 commits into
major/3.0from
ivana/major/remove-enable-logs-and-metrics
Aug 25, 2026
Merged

chore: Drop enable_logs, enable_metrics options in new major#7178
sentrivana merged 5 commits into
major/3.0from
ivana/major/remove-enable-logs-and-metrics

Conversation

@sentrivana

@sentrivana sentrivana commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

The options were deprecated with 2fef9bc.

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

110340 passed | ❌ 2 failed | ⏭️ 5428 skipped | Total: 115770 | Pass Rate: 95.31% | Execution Time: 385m 1s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +10369
Passed Tests 📈 +11418
Failed Tests 📈 +2
Skipped Tests 📉 -1051

➕ New Tests (2)

View new tests
  • test_url_query_data_collection_span_streaming[send_default_pii_true]
    • File: tests.integrations.sanic.test_sanic
    • Status: ❌ Failing
  • test_cache_spans_decorator[True]
    • File: tests.integrations.django.test_cache_module
    • Status: ❌ Failing

❌ Failed Tests

test_url_query_data_collection_span_streaming[send_default_pii_true]

File: tests.integrations.sanic.test_sanic
Suite: py3.10-sanic-v23.12.2
Error: OSError: [Errno 98] error while attempting to bind on address ('127.0.0.1', 34821): address already in use

Stack Trace
tests/integrations/sanic/test_sanic.py:730: in test_url_query_data_collection_span_streaming
    with c as client:
/usr/lib/python3.10/contextlib.py:135: in __enter__
    return next(self.gen)
tests/integrations/sanic/test_sanic.py:93: in reusable_client
    client.__enter__()
.tox/py3.10-sanic-v23.12.2/lib/python3.10/site-packages/sanic_testing/reusable.py:65: in __enter__
    self.run()
.tox/py3.10-sanic-v23.12.2/lib/python3.10/site-packages/sanic_testing/reusable.py:77: in run
    self._server = self._run(self._server_co)
.tox/py3.10-sanic-v23.12.2/lib/python3.10/site-packages/sanic_testing/reusable.py:198: in _run
    return self._loop.run_until_complete(coro)
/usr/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
    return future.result()
.tox/py3.10-sanic-v23.12.2/lib/python3.10/site-packages/sanic/mixins/startup.py:612: in create_server
    return await serve(
.tox/py3.10-sanic-v23.12.2/lib/python3.10/site-packages/sanic/server/async_server.py:113: in __await__
    self.server = task.result()
/usr/lib/python3.10/asyncio/base_events.py:1519: in create_server
    raise OSError(err.errno, 'error while attempting '
E   OSError: [Errno 98] error while attempting to bind on address ('127.0.0.1', 34821): address already in use

test_cache_spans_decorator[True]

File: tests.integrations.django.test_cache_module
Suite: py3.12-django-v4.2.30
Error: tests/integrations/django/test_cache_module.py:380: in test_cache_spans_decorator assert not spans[0]["attributes"]["cache.hit"] E assert not True

Stack Trace
tests/integrations/django/test_cache_module.py:380: in test_cache_spans_decorator
    assert not spans[0]["attributes"]["cache.hit"]
E   assert not True

✅ Patch coverage is 100.00%. Project has 2275 uncovered lines.
✅ Project coverage is 90.49%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    89.93%    90.49%    +0.56%
==========================================
  Files          193       185        -8
  Lines        24908     23910      -998
  Branches      8986      8808      -178
==========================================
+ Hits         22398     21635      -763
- Misses        2510      2275      -235
- Partials      1430      1378       -52

Generated by Codecov Action

@sentrivana
sentrivana marked this pull request as ready for review August 12, 2026 14:05
@sentrivana
sentrivana requested a review from a team as a code owner August 12, 2026 14:05

@ericapisani ericapisani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Other than the one note for our guidance in the migration guide, this LGTM

Comment thread MIGRATION_GUIDE.md
- Removed the RedisIntegration `max_data_size` option.
- Removed the possibility to supply a specific client to the LaunchDarklyIntegration.
- The `enable_tracing` option was removed. Use `traces_sample_rate=1.0` instead.
- The `enable_logs` option was removed. Using Sentry's logging API now works without requiring setting `enable_logs=True`. Automatic capture of logs emitted by the `logging` standard library module or Loguru can be turned on by providing the `capture_sentry_logs=True` option to either `LoggingIntegration` or `LoguruIntegration`:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Automatic capture of logs emitted by the logging standard library module or Loguru can be turned on by providing the capture_sentry_logs=True option to either LoggingIntegration or LoguruIntegration

GivenLoggingIntegration and LoguruIntegration are both auto-enabling integrations, I wonder if it might be more useful to give an example for opting out rather than opting in.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

They're auto-enabling for errors, but they won't start capturing logs unless you explicitly opt in. So no logs is default behavior, and if you want logs, you need to explicitly enable that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Also, status update 🤦🏻‍♀️ but this will change in a later PR. Will leave this as is as it captures the current state and will update it in the follow up PR.

@sentrivana
sentrivana merged commit e071fa9 into major/3.0 Aug 25, 2026
125 of 127 checks passed
@sentrivana
sentrivana deleted the ivana/major/remove-enable-logs-and-metrics branch August 25, 2026 11:55
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