getsentry / sentry-unity

Development of Sentry SDK for Unity
https://docs.sentry.io/platforms/unity/
MIT License
207 stars 51 forks source link

Breadcrumb category handling #188

Closed semuserable closed 3 years ago

semuserable commented 3 years ago

We don't assign categories for breadcrumbs from Unity. It means that if user tries to use options.BeforeBreadcrumb based on the docs (Customize Breadcrumbs section) then he/she might find a non-expected behaviour.

Not expected stuff based on current docs

What needs to be done

bruno-garcia commented 3 years ago

We don't assign categories for breadcrumbs from Unity.

We should set a category such as unity.logger

generic is set by Sentry if the SDK didn't send any.

Also we can just change the docs to show a different use case for BeforeBreadcrumb such as:

    options.BeforeBreadcrumb = breadcrumb => breadcrumb.Message?.StartsWith("bad crumb") ? null : breadcrumb;
semuserable commented 3 years ago

Do you want to add _hub.AddBreadcrumb functionality into UnityLogger?

Also, we have 2 _hub.AddBreadcrumb calls in UnityApplicationLoggingIntegration.OnLogMessageReceived,

one for "normal breadcrumb" image

and another for "special breadcrumb" image

What categories should be assigned here?

bruno-garcia commented 3 years ago

I believe the same category is fine.