Title: Log message formatting options · Issue #228 · getsentry/sentry-python · GitHub
Open Graph Title: Log message formatting options · Issue #228 · getsentry/sentry-python
X Title: Log message formatting options · Issue #228 · getsentry/sentry-python
Description: The raven client had a defined log handler which let you use python's built in logging configuration mechanisms to control how log messages looked when they were passed to sentry, however the new python-sdk does not appear to have any eq...
Open Graph Description: The raven client had a defined log handler which let you use python's built in logging configuration mechanisms to control how log messages looked when they were passed to sentry, however the new p...
X Description: The raven client had a defined log handler which let you use python's built in logging configuration mechanisms to control how log messages looked when they were passed to sentry, however the n...
Opengraph URL: https://github.com/getsentry/sentry-python/issues/228
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Log message formatting options","articleBody":"The raven client had a defined log handler which let you use python's built in logging configuration mechanisms to control how log messages looked when they were passed to sentry, however the new python-sdk does not appear to have any equivalent option. I have a number of apps where I have log messages managed by [`structlog`](http://www.structlog.org/en/stable/), where `structlog` hooks into python's logging and formatts everything nicely with pretty readable colours, nicely formatted timestamps, before it gets sent to stdout, however the combination of how `python-sdk` hooks into logging, and the formatting of these messages means that the new sentry-sdk logging integration/handling makes an absolute mess of things producing unhelpful results in sentry.io like dozens of variations of `[2m2019-01-03T07:16:00.573607Z[0m [[31m[1merror [0m] [1mcan_send_message is Fals...` each with one recorded error event, instead of a single `can_send_message is False` with the correct count of error events. \r\n\r\nWhat is the mechanism for the sentry-sdk to work with python's logging formatters and libraries such as structlog?","author":{"url":"https://github.com/techdragon","@type":"Person","name":"techdragon"},"datePublished":"2019-01-03T07:29:23Z","url":"https://github.com/getsentry/sentry-python/issues/228"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c9e82e31-bd03-54e7-11ba-385f0338704b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E5D6:20F35A:943585:C9180B:6B053B3F |
| html-safe-nonce | dd977d11eece488cd91a3463eeb1c141716b3fbf164c510a8b87bb1c2e7ef24a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUQ2OjIwRjM1QTo5NDM1ODU6QzkxODBCOjZCMDUzQjNGIiwidmlzaXRvcl9pZCI6Ijc0NDk5NzY2MjMzMzc5MTMxNTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9025f170a7ef28ac472259401c78406bea78da4835a7d66246ee2be5ad1debdd |
| hovercard-subject-tag | issue:395478551 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-python/228/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9da268ae4c7317a3d585fabbb8d386523d4012cd78b04cff78ef59d9ef6ace16/getsentry/sentry-python/issues/228 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9da268ae4c7317a3d585fabbb8d386523d4012cd78b04cff78ef59d9ef6ace16/getsentry/sentry-python/issues/228 |
| og:image:alt | The raven client had a defined log handler which let you use python's built in logging configuration mechanisms to control how log messages looked when they were passed to sentry, however the new p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | techdragon |
| hostname | github.com |
| expected-hostname | github.com |
| None | 854d880890b5e847b3fce9d1b31f032107baeddeebad2aa379c48aa4f1451f6b |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 137814779 |
| octolytics-dimension-repository_nwo | getsentry/sentry-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 137814779 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 220e980097d94ce616d5d11fbd5316d208e3fc93 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width