Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Export client.EventFromMessage, client.EventFromException, and event.SetException #607

Merged
merged 5 commits into from
May 2, 2023

Conversation

cleptric
Copy link
Member

@cleptric cleptric commented Mar 22, 2023

Export the existing client.EventFromMessage, client.EventFromException, and the new event.SetException method to facilitate logging integrations.

refs #291 (comment)

@codecov
Copy link

codecov bot commented Mar 22, 2023

Codecov Report

Patch coverage: 91.17% and project coverage change: -0.13 ⚠️

Comparison is base (eb22fb5) 80.03% compared to head (2e19be6) 79.90%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #607      +/-   ##
==========================================
- Coverage   80.03%   79.90%   -0.13%     
==========================================
  Files          38       38              
  Lines        3881     3887       +6     
==========================================
  Hits         3106     3106              
- Misses        669      673       +4     
- Partials      106      108       +2     
Impacted Files Coverage Δ
interfaces.go 92.57% <86.36%> (-0.76%) ⬇️
client.go 88.92% <100.00%> (-0.57%) ⬇️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@KevinSnyderCodes
Copy link

#608

This adds a new method Event.SetException() which decouples the Event creation and the setting of its Exception field. Client.EventFromException() now uses Event.SetException() under the hood.

This allows you to populate an Event with an exception and other data separately from the Client before calling Client.CaptureEvent().

@cleptric cleptric closed this Apr 3, 2023
@tonyo tonyo reopened this Apr 28, 2023
@tonyo tonyo changed the title feat: Export client.EventFromMessage and client.EventFromException feat: Export client.EventFromMessage, client.EventFromException, and event.SetException Apr 28, 2023
@tonyo tonyo self-assigned this Apr 28, 2023
@tonyo tonyo marked this pull request as ready for review April 28, 2023 13:19
@tonyo tonyo self-requested a review April 28, 2023 13:20
@tonyo
Copy link
Contributor

tonyo commented Apr 28, 2023

@cleptric merged #608 into this PR (thanks @KevinSnyderCodes), and added a few docstrings. Should be good to go, I think 👍

@cleptric cleptric merged commit eb7fca9 into master May 2, 2023
@cleptric cleptric deleted the export-new-functions branch May 2, 2023 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants