question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set tags from exception?

See original GitHub issue

We enrich exceptions adding context to the Data dictionary

Sentry does handle these and send them over, in the UI they appear as “Additional Data”.

However, it is not possible to search errors in the UI using Additional data Key or Value, only “tags”.

I wonder if it makes sense to somehow set tags using the Data dictionary? (maybe under a “tags” key).

Since our modules are not aware of Sentry (they get a Serilog logger instance only), I cannot see another way of settings specific tags on error handling time, but am welcome to suggestions.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bruno-garciacommented, Feb 14, 2021

That could work to.

What about?

Exception.Data["Sentry:Tag:123"] = "321" results in SentrySdk.SetTag("123", "321")

And: Exception.Data["Sentry:Contexts:123"] = new { Obj = "312" } results in SentrySdk.Contexts["123"] = new { Obj = "312" }

@Tyrrrz thoughts?

Do we need to bother with priority? Does this override any tag already set on the event or set in the scope?

0reactions
bruno-garciacommented, Feb 23, 2021

This wasn’t shipped yet though, it’ll be on whatever comes after version 3.0.7 (probably 3.0.8)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tagging and exception handling
Our solution is to tag the final field with read-only access in the global allocation table. If some offset table is expecting the...
Read more >
Firing triggers and trigger exceptions - Tag Manager Help
To add or remove a trigger from a tag configuration, or to create an exception: Click Tags in the left navigation. Click the...
Read more >
Setting an exception for global <p> tag - html
I have set a global attribute to <p> to make the first letter of the paragraph a big, colorful letter. Now I have...
Read more >
Label your exceptions and stay organized with Raygun's ...
Tags are labels that can be given to exceptions inside your code. These labels are then passed onto Raygun when exceptions are tracked....
Read more >
Add tags when exception occurs - SDKs
I found out that maximum length of tag is 200, but I am trying to pass state of my application, which is 300-1000...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found