sentry-python icon indicating copy to clipboard operation
sentry-python copied to clipboard

When tracking the value of a variable, correctly indicate it with { } curly brackets if it is a set

Open dashed opened this issue 2 years ago • 4 comments

Problem Statement

In the following screenshot for a Sentry error captured with the Python Sentry SDK, it's non obvious which of the variables, current_state and new_state is the set or the list. It'll be helpful if we can indicate one is a set with curly brackets.

Screenshot 2023-03-21 at 4 25 08 PM

Solution Brainstorm

Use curly brackets for the stacktrace variable value if it is a set-like object.

dashed avatar Mar 21 '23 20:03 dashed

I had talked to @untitaker about this, and he indicated that this should be possible since the SDK has access to that information.

dashed avatar Mar 21 '23 20:03 dashed

This needs protocol extensions, not easily fixable within the SDK though yes, it does have that information.

untitaker avatar Mar 21 '23 22:03 untitaker

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

github-actions[bot] avatar Apr 12 '23 00:04 github-actions[bot]

Reclassifying this as a bug because using square brackets for a set is incorrect

szokeasaurusrex avatar Sep 06 '24 08:09 szokeasaurusrex

This is because we can not serialize sets in JSON and thus convert them into lists before we sent the event to Sentry. Currently we do not have a possibility to attach a type to vars in the events payload, so the UI could render those converted lists as sets.

This would only be possible with a bigger change involving SDKs, ingestion, and backend/UI. Because this was never requested from someone outside of Sentry I will close this issue now and WONTDO.

If there is a strong desire to have this feature please open a new Issue, if there is then some demand from our users (by thumbs-up or comments on the issue) we can think again about implementing this.

For now we wont to this, sorry.

antonpirker avatar Mar 18 '25 13:03 antonpirker