8000 Loguru integration does not support disabled_integrations? · Issue #4398 · getsentry/sentry-python · GitHub
[go: up one dir, main page]

Skip to content
Loguru integration does not support disabled_integrations? #4398
@alicederyn

Description

@alicederyn

How do you use Sentry?

Self-hosted/on-premise

Version

2.28.0

Steps to Reproduce

As I understand the docs, you would disable Loguru integration like follows:

sentry_sdk.init(..., disabled_integrations=[LoguruIntegration()])

Expected Result

Loguru integration to be disabled.

Actual Result

LoguruIntegration is enabling itself in its __init__ method, not in setup_once:

@staticmethod
def setup_once():
# type: () -> None
pass # we do everything in __init__

This means the above code does not actually disable Loguru integration at all, it actually enables it earlier. I don't want to have to disable all automatic integrations just to disable this one.

(Also, given sentry_sdk.init is a context manager, I would expect Loguru integration to be disabled once the context manager was exited -- this would help with running test suites :) )

Metadata

Metadata

Assignees

< 4FD8 ul class="prc-ActionList-ActionList-X4RiC Assignees-module__assigneesList--aQ4Cj" data-dividers="false" data-variant="full">
  • @sentrivana
    sentrivana
  • Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0