Skip to content

Version 0.5.0 leaks logger.exeption to Sentry #43

Description

@antonpirker

Environment

Version 0.5.0 with Python SDK 3.0.0a2.

In our dogfooding PR review @asottile mentioned that the pytest-sentry plugin, if you use logger.exception in the code under test, those exceptions land in Sentry (but should not) pytest-sentry should only send data about test-failures to Sentry and not about errors in the code that is tested.

I tried to reproduce with this demo project, but could not reproduce the mentioned behavior.

The config in the test project is:

export PYTEST_SENTRY_DSN="..."
export PYTEST_SENTRY_TRACES_SAMPLE_RATE=1
export PYTEST_SENTRY_ALWAYS_REPORT=1
export PYTEST_SENTRY_DEBUG=True
export SENTRY_ENVIRONMENT="test-pytest-sentry-3.0.0a2"
export PYTEST_SENTRY_PROFILES_SAMPLE_RATE=1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions