getsentry / getsentry/sentry-python

Make the `structlog` integration for Sentry logs

Open
#4,417 7 comments 11 reactions 1 assignee Claimed by @alexander-alderman-webb View on GitHub
Feature Logs Python
Dominant language
Python
Stars
2.2k
Forks
669
Avg merge
1d 1h
Merged PRs (30d)
213

Description

### Problem Statement

`structlog` logs can be sent to Sentry via the existing `LoggingIntegration`; however, this does not preserve the structuring of the logs (e.g. if the logs have custom attributes set, these are included in the log message). See [this example](https://github.com/getsentry/sentry-python/issues/4417#issuecomment-2910640972)

### Solution Brainstorm

Instead, create a dedicated `structlog` integration, which would add these logs to the log event as custom attributes.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.