You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SetContext function signature can be improved to make it clear to users that it only accept maps. Unless it is not a case and there is a bug to be fixed.
I searched the repository for usage but it seems the same (the tests are using the same approach as mine above). In online documentation there is a following statement:
The best practice to attach custom data is via structured contexts. A context must always be a dictionary or map, and its values can be arbitrary.
Why the function doesn't have in its signature that it accepts only map[string]interface{} but instead there is interface{}? Current signature seems counter-intuitive.
Also, is there a way to enrich the context under a given key later? Right now the object under the key is being overwritten so the namespace can't be enriched.
Summary
SetContext function signature can be improved to make it clear to users that it only accept maps. Unless it is not a case and there is a bug to be fixed.
I searched the repository for usage but it seems the same (the tests are using the same approach as mine above). In online documentation there is a following statement:
Why the function doesn't have in its signature that it accepts only
map[string]interface{}
but instead there isinterface{}
? Current signature seems counter-intuitive.Also, is there a way to enrich the context under a given key later? Right now the object under the key is being overwritten so the namespace can't be enriched.
Steps To Reproduce
Expected Behavior
Values to be rendered correctly.
Screenshots
Environment
SDK
sentry-go
version: github.com/getsentry/sentry-go v0.12.0Sentry
Additional context
The text was updated successfully, but these errors were encountered: