From 1ddc2222294434b8670406c5b65f63f426fe7e0b Mon Sep 17 00:00:00 2001 From: Benjamin Woosley Date: Tue, 21 Nov 2023 10:59:25 -0600 Subject: [PATCH] Add clarification on set_context types This api has undocumented requirements on the type of the value, particularly, being a hash. This should be documented so that callers can be appraised of the requirement without inspecting the source code. --- src/docs/sdk/unified-api/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/sdk/unified-api/index.mdx b/src/docs/sdk/unified-api/index.mdx index b73ad2daca..58842cb5d8 100644 --- a/src/docs/sdk/unified-api/index.mdx +++ b/src/docs/sdk/unified-api/index.mdx @@ -201,7 +201,7 @@ Sentry.configureScope(scope => - `scope.set_tags(tags)`: Sets an object with key/value pairs, convenience function instead of multiple `set_tag` calls. -- `scope.set_context(key, value)`: Sets the context key to a value, overwriting a potential previous value. Removing a key is SDK-defined, either with a `remove_context` function or by passing nothing as data. The types are sdk specified. +- `scope.set_context(key, value)`: Sets the context key to a value, overwriting a potential previous value. The key must be a string, the value must be a hash or dictionary with strings for keys. Removing a key is SDK-defined, either with a `remove_context` function or by passing nothing as data. The types are sdk specified. - `scope.set_level(level)`: Sets the level of all events sent within this scope.