Skip to content

chore(issues): Update capture_message for Python #14604

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/platforms/python/usage/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ While capturing an event, you can also record the breadcrumbs that lead up to th

## Capturing Messages

Another common operation is to capture a bare message. A message is textual information that should be sent to Sentry. Typically, our SDKs don't automatically capture messages, but you can capture them manually.
While uncommon, you can also manually capture a plain message without an exception.

Messages show up as issues on your issue stream, with the message as the issue name.
Messages show up as issues on your issue stream, with the message as the issue name so avoid serializing payloads or embedding unique values in the message text, instead attach additional information via tags and context.

<PlatformContent includePath="capture-message" />
5 changes: 4 additions & 1 deletion platform-includes/capture-message/python.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
```python
import sentry_sdk

sentry_sdk.capture_message('Something went wrong')
sentry_sdk.capture_message(
'Something went wrong',
tags={'component': 'worker', 'region': 'us-west-2'}
)
```