Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I use logfire with Sentry to let logfire.error can trigger Sentry issue by Default? #849

Open
dealexchen opened this issue Feb 8, 2025 · 0 comments
Labels
Question Further information is requested

Comments

@dealexchen
Copy link

Question

Hi team,

I love logfire so much and trying to replace all my current loggings with logfire. But some problem I met is that before with the configuration, if we do logger.error in code, it will automatcally trigger a Sentry issue. But now if logifire we lose it.
I checked the docs of logfire but didn't find out how to achieve the same goal with logfire. Can you help me with this?

Here's my sentry configuration.

Thank you!

sentry_logging = LoggingIntegration(
    level=logging.WARNING,  # Minimum logging level to capture
    event_level=logging.WARNING,  # Set to logging.WARNING to capture warning and above
)

if settings.SENTRY_DSN:
    sentry_sdk.init(
        dsn=str(settings.SENTRY_DSN),
        integrations=[sentry_logging],
        enable_tracing=True,
        traces_sample_rate=1.0,
        _experiments={
            # Set continuous_profiling_auto_start to True
            # to automatically start the profiler on when
            # possible.
            "continuous_profiling_auto_start": True,
        },
    )

@dealexchen dealexchen added the Question Further information is requested label Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant