Skip to content

Commit db8fed9

Browse files
authored
feat(js): Better document tag key/value requirements (#13636)
Closes https://linear.app/getsentry/issue/FE-394/user-feedback-tags-with-spaces-cause-problems
1 parent b479529 commit db8fed9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

docs/platforms/javascript/common/apis.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,11 @@ Messages show up as issues on your issue stream, with the message as the issue n
310310
signature="function setTag(key: string, value: string): void"
311311
parameters={[]}
312312
>
313-
Set a tag to be sent with Sentry events.
313+
Set a tag to be sent with Sentry events.
314+
315+
- Tag keys have a maximum length of 32 characters and can contain only letters (`a-zA-Z`), numbers (`0-9`), underscores (`_`), periods (`.`), colons (`:`), and dashes (`-`).
316+
- Tag values have a maximum length of 200 characters and they cannot contain the newline (`\n`) character.
317+
314318
</SdkApi>
315319

316320
<SdkApi

docs/platforms/javascript/common/enriching-events/tags/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ We’ll automatically index all tags for an event, as well as the frequency and
99

1010
_Tag keys_ have a maximum length of 32 characters and can contain only letters (`a-zA-Z`), numbers (`0-9`), underscores (`_`), periods (`.`), colons (`:`), and dashes (`-`).
1111

12+
<Alert level="warning">Spaces in tag keys are not allowed.</Alert>
13+
1214
_Tag values_ have a maximum length of 200 characters and they cannot contain the newline (`\n`) character.
1315

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

0 commit comments

Comments
 (0)