Skip to content

Commit

Permalink
docs(python): Document set_tags function
Browse files Browse the repository at this point in the history
Add documentation for the [new `set_tags` function](getsentry/sentry-python#2978) in the Python SDK.

Closes GH-9703
  • Loading branch information
szokeasaurusrex committed Apr 15, 2024
1 parent 41d91f3 commit b00cb8a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/platforms/python/enriching-events/tags/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,18 @@ _Tag values_ have a maximum length of 200 characters and they cannot contain the

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

Define the tag:
Tags can be set with the `set_tag` function:

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

Alternatively, multiple tags can be set at once with the `set_tags` function:

```python
from sentry_sdk import set_tags

set_tags({"page.locale": "de-at", "page.type": "article"})
```

<Note>

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.
Expand Down

0 comments on commit b00cb8a

Please sign in to comment.