Skip to content

Commit b00cb8a

Browse files
docs(python): Document set_tags function
Add documentation for the [new `set_tags` function](getsentry/sentry-python#2978) in the Python SDK. Closes GH-9703
1 parent 41d91f3 commit b00cb8a

File tree

1 file changed

+9
-1
lines changed
  • docs/platforms/python/enriching-events/tags

1 file changed

+9
-1
lines changed

docs/platforms/python/enriching-events/tags/index.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,18 @@ _Tag values_ have a maximum length of 200 characters and they cannot contain the
1313

1414
Defining tags is easy, and will bind them to the [current scope](../scopes/) ensuring all future events within scope contain the same tags.
1515

16-
Define the tag:
16+
Tags can be set with the `set_tag` function:
1717

1818
<PlatformContent includePath="enriching-events/set-tag" />
1919

20+
Alternatively, multiple tags can be set at once with the `set_tags` function:
21+
22+
```python
23+
from sentry_sdk import set_tags
24+
25+
set_tags({"page.locale": "de-at", "page.type": "article"})
26+
```
27+
2028
<Note>
2129

2230
Some tags are automatically set by Sentry. We strongly recommend against overwriting these [tags](/product/reference/search/searchable-properties/#search-properties). Instead, name your tags with your organization's nomenclature. If you overwrite an automatically set tag, you must use [explicit tag syntax](/product/reference/search/#explicit-tag-syntax) to search for it.

0 commit comments

Comments
 (0)