Skip to content

Commit

Permalink
document supported features
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Mar 8, 2024
1 parent 6e68051 commit a6ff3fe
Showing 1 changed file with 38 additions and 3 deletions.
41 changes: 38 additions & 3 deletions test/sentry-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,54 @@
release=f"[email protected].{n}"
)

# These are not currently supported
# These are not currently supported (PRs welcome!)
add_breadcrumb(
category='auth',
message='Authenticated user %s' % 'hexylena',
level='info',
)
# Sent as:
# "breadcrumbs": {
# "values": [
# {
# "category": "auth",
# "level": "info",
# "message": "Authenticated user hexylena",
# "timestamp": "2024-03-08T10:35:49.573714Z",
# "type": "default"
# }
# ]
# },


# This is though!
sentry_sdk.set_context("user", "hexylena")
sentry_sdk.set_context("level", "info")
# Sent as:
# "contexts": {
# "level": "info",
# "runtime": {
# "build": "3.11.7 (main, Dec 18 2023, 00:00:00) [GCC 13.2.1 20231011 (Red Hat 13.2.1-4)]",
# "name": "CPython",
# "version": "3.11.7"
# },
# "trace": {
# "parent_span_id": null,
# "span_id": "9f1128787d8b8323",
# "trace_id": "b6f4d1a8eff0439b800644e067013f19"
# },
# "user": "hexylena"
# },


# Not this (yet)
# set_user({"username": "hexylena", "email": "[email protected]"})
# Sent as:
# "user": {
# "email": "[email protected]",
# "username": "hexylena"
# }

# Also
set_user({"username": "hexylena", "email": "[email protected]"})


def b():
Expand Down

0 comments on commit a6ff3fe

Please sign in to comment.