Skip to content

ref(native): capture-error using high-level API. #5085

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

Conversation

supervacuus
Copy link
Collaborator

@Swatinem and @jan-auer: this is my suggested change to the documentation after our conversation on Tuesday. It replaces the low-level calls with all currently available high-level APIs. It also shows how to add a stack trace to the exception instead of only referring to it.

Instead of having two, we can provide only one example with the stack trace (and comment on its optionality).

@vercel
Copy link

vercel bot commented May 29, 2022

@supervacuus is attempting to deploy a commit to the Sentry Team on Vercel.

A member of the Team first needs to authorize it.

Comment on lines +24 to +25
sentry_value_t stacktrace = sentry_value_new_stacktrace(NULL, 0);
sentry_value_set_by_key(exc, "stacktrace", stacktrace);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was these two which we could replace with another function:

void sentry_value_add_stacktrace(sentry_value_t, void**, size_t)

to get rid of key/entry management on the client-side, correct?

Copy link
Member

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is spot on!

@supervacuus
Copy link
Collaborator Author

Great! So, how should we proceed with the API? Should we update/release the doc without the added interface, since it is compatible with the 0.4.17 release of sentry-native, and then update the docs again later after we have released sentry-native with the new interface? Or would you wait with the doc update until we have the sentry-native release with sentry_value_add_stacktrace?

@Swatinem
Copy link
Member

I will merge this as is now, we can then add the API and update the docs again once it is in a published release.

@Swatinem Swatinem merged commit 192829f into getsentry:master May 30, 2022
adinauer added a commit that referenced this pull request Jun 9, 2022
* Update docs to use Hint object

* Revert migration guide changes

* Change import for Hint

* Document how to manipulate attachments via hints (#5070)

* Document how to manipulate attachments via hints

* Apply suggestions from code review

Co-authored-by: Isabel <[email protected]>

* Update src/includes/enriching-events/add-attachment/java.mdx

Co-authored-by: Isabel <[email protected]>

* Apply suggestions from code review

Co-authored-by: Isabel <[email protected]>

* ref(frontend): Bump JS SDK to 7.0 beta 2 (#5064)

* bump to 7.0 beta 2

* update yarn.lock

* Fix manifest code snippet tag (#5069)

* fix: typos in Unity troubleshooting (#5060)

* Typo fix (#5059)

* fix references to source maps and time range change example (#5051)

* Fix typo in query builder docs (#5072)

* updated banner (#5067)

* docs(js): Add sourcemaps explain to source maps troubleshooting guide (#5076)

* feat(discover): extend list of stacking functions (#5074)

- This list is a bit outdated, and there are many more functions that
  discover supports. Updating this to include all of them, but longterm
  probably worth revisiting this section of docs
- This is so the API docs can link here

* chore: bump Sentry SDK to 7.0.0-rc.0 (#5077)

* chore(billing): GA on-demand budget for all performance plans (#5075)

* fix(alerts): Remove duplicate alert rules section (#5080)

* feat(visibility): Add a note about apdex score (#5081)

- This is cause I've heard folks confused whether a higher apdex score
  is better or not, and personally forget sometimes.

* feat(unity): Added Screenshot to Verify (#5031)

* added sample screenshot

* Update src/includes/getting-started-verify/unity.mdx

Co-authored-by: Isabel <[email protected]>

* jpg -> png

Co-authored-by: Bruno Garcia <[email protected]>
Co-authored-by: Isabel <[email protected]>

* Add instructions to tree shake tracing code in JS SDK (#5086)

* Add docs for new attachments API (#5073)

Co-authored-by: Isabel <[email protected]>

* Add React Router v6 instrumentation docs. (#5037)

Co-authored-by: Isabel <[email protected]>

* Remove `ignoreSentryErrors` section in JS docs (#5036)

* Update ExtraErrorData depth description (#5021)

JavaScript SDK: Updates `ExtraErrorData` `depth` option description to not mention a workaround for the global `normalizeDepth` option.

* feat(angular): Update Angular docs for v7 release (#4963)

This PR updates our Angular SDK docs for the v7 release. It adds information about compatibility of our SDK with different Angular versions and updates information on `TraceDirective` compatibility.

* Adjust JS CDN bundle page to reflect ES5/ES6 naming changes (#4962)

Co-authored-by: Isabel <[email protected]>

* ref(js): change migration guide URLs from v7 branch to master (#5087)

This small PR changes the URLs of two links to the JS SDK migration guide which previously linked to the 7.x branch version of the migration guide. It now links to master since we merged the 7.x branch

* Adust docs for dealing with baggage headers (CORS and meta tags) (#5061)

Adjust the JS SDK Performance Monitoring -> "Connect Services" page by adding information about the newly introduced baggage header and its propagation. It adds instructions on setting up CORS rules to accept the new header as well as how to add the baggage information to meta tags for server-originating traces.

* Add tree shaking guide for default integrations (#4996)

Co-authored-by: Isabel <[email protected]>

* Replace deprecated severity enums with string literals (#4940)

Co-authored-by: Lukas Stracke <[email protected]>

* getsentry/relay@8fcff0b

* Adust docs after renaming `UserAgent` integration to `HttpContext` (#4997)

This PR adjusts docs after renaming the UserAgent integration in the Sentry JS SDK to HttpContext

* Add Prisma ORM Integration Docs. (#4961)

Co-authored-by: Isabel <[email protected]>

* chore: bump Sentry SDK to 7.0.0 (#5088)

* ref(native): capture-error using high-level API. (#5085)

* feat(widget-builder): Add GA documentation - (#5065)

* Add SampleRate code sample for go (#5090)

* fix(android): Typo for UI transactions (#5096)

* ref(js): Add note about old name of HttpContext integration (#5099)

Adds a note to the HttpContext integration of the JS SDK explaining that it was called UserAgent before v7. This ensures that pre-v7 users can find correct information about their default integrations.

* ref(js): Add baggage intormation to automatic instrumentation page (#5095)

Add instructions on how to deal with the new baggage header in CORS settings. The baggage header was introduced in v7 of the JS SDK.

* feat(apple): User interaction instrumentation (#5098)

Add docs similar to user interaction instrumentation on Android.
As the implementations don't match exactly we can't create reusable docs.

Co-authored-by: Isabel <[email protected]>
Co-authored-by: Roman Zavarnitsyn <[email protected]>

* dotnet performance clarify GetSpan (#5078)

Co-authored-by: Isabel <[email protected]>
Co-authored-by: Matt Johnson-Pint <[email protected]>
Co-authored-by: Bruno Garcia <[email protected]>

* chore(unity): Fixed typo (#5050)

Co-authored-by: Bruno Garcia <[email protected]>

* docs: add explanation regarding appcenter token (#5063)

* ref(integration-platform): Add URI formatting guidelines to docs (#5103)

This PR adds a blurb explaining the URI formatting guidelines for the schema they provide when specifying UI Components. Each instance of a URI attribute links back to these guidelines.

* improve enable suspect commits content (#5094)

* restructured page

* restructured page

* restructured enable suspect commits page

* fixes to improve flow

* fixing typo and clarifying language

* wording fixes

* feat(alerts): Restore duplciate alert rule docs (#5111)

* feat(integrations): Direct users to the reference implementation (#5053)

* getsentry/relay@acb94fa

* ref(android): Simplify UI transaction code sample (#5097)

Reduce the complexity of the code sample for manually adding spans
to user interaction transacrtions.

Co-authored-by: Roman Zavarnitsyn <[email protected]>

* feat(unity): Added additional platforms to native support (#5109)

* improved native support docs

* Update src/includes/getting-started-primer/unity.mdx

Co-authored-by: Isabel <[email protected]>

* Update src/platforms/unity/native-support/index.mdx

Co-authored-by: Isabel <[email protected]>

* Update src/platforms/unity/native-support/index.mdx

Co-authored-by: Isabel <[email protected]>

* Update src/platforms/unity/native-support/index.mdx

Co-authored-by: Isabel <[email protected]>

* Update src/platforms/unity/native-support/index.mdx

Co-authored-by: Isabel <[email protected]>

* Update src/platforms/unity/native-support/index.mdx

Co-authored-by: Isabel <[email protected]>

Co-authored-by: Isabel <[email protected]>

* feat(apple): Add UI instrumentation to wizard (#5100)

* Refactor Ionic/Capacitor/Cordova Wizards (#5093)

Co-authored-by: Isabel <[email protected]>

* fix(quotas): Clarify filters application scope (#5102)

Inbound data filters are applied to all events, including transactions.
See [envelope
filtering](https://github.com/getsentry/relay/blob/7c6b308bbf04e63e8e0b456489da1ddc320e2e6a/relay-server/src/actors/envelopes.rs#L1603)
and the [should_filter
check](https://github.com/getsentry/relay/blob/7c6b308bbf04e63e8e0b456489da1ddc320e2e6a/relay-filter/src/lib.rs#L38-L60) in relay.

* feat(api): Update the bump script since CI doesn't run it (#5115)

- this is so the script can be run on MacOS where the date function is
  slightly different

* chore(api): bump api sha with events doc (#5116)

Bump the SENTRY_API_SCHEMA_SHA with latest changes

* Add metric alert slack example with new chart (#5113)

Co-authored-by: Isabel <[email protected]>

* Change migration guide for hints (#5068)

* Add discontinuation of AngularJS 1.x (#5123)

* feat(docs): Document flutter autoInitializeNativeSdk (#5029)

* chore(unity): Updated troubleshooting for 2022 (#5122)

* ref(native): Clarify before_send with Crashpad (#5092)


Co-authored-by: Isabel <[email protected]>

* getsentry/relay@d8f887a

* docs(dashboards): Releases in Dashboards (#5083)

Documentation for the Releases widget in Dashboard

* fix transaction quota management content (#5114)

* added inbound filters to transaction quota mgmt, removed beforeSend, and fixed inbound filter reference on quotas index page

* fixed typo

* feat(alerts): Alert wizard v3 alert config docs (#5107)

* feat(alerts): Alert wizard v3 alert config docs

* addressing comments updating screenshots

* update screenshot

* review 2

* reverting an accidental change

Co-authored-by: Isabel <[email protected]>

* hid banner (#5127)

* feat(android): App permissions in App Context (#5038)

Co-authored-by: Isabel <[email protected]>
Co-authored-by: Katie Byers <[email protected]>
Co-authored-by: Manoel Aranda Neto <[email protected]>
Co-authored-by: Ivan Dlugos <[email protected]>
Co-authored-by: Asko Kauppi <[email protected]>
Co-authored-by: Aru Sahni <[email protected]>
Co-authored-by: dorothymlee <[email protected]>
Co-authored-by: Kamil Ogórek <[email protected]>
Co-authored-by: William Mak <[email protected]>
Co-authored-by: Vladan Paunovic <[email protected]>
Co-authored-by: Alberto Leal <[email protected]>
Co-authored-by: Taylan Gocmen <[email protected]>
Co-authored-by: Stefan Jandl <[email protected]>
Co-authored-by: Bruno Garcia <[email protected]>
Co-authored-by: Luca Forstner <[email protected]>
Co-authored-by: Tim Fish <[email protected]>
Co-authored-by: Onur Temizkan <[email protected]>
Co-authored-by: Lukas Stracke <[email protected]>
Co-authored-by: Joris Bayer <[email protected]>
Co-authored-by: Mischan Toosarani-Hausberger <[email protected]>
Co-authored-by: Priscila Oliveira <[email protected]>
Co-authored-by: Neel Shah <[email protected]>
Co-authored-by: Philipp Hofmann <[email protected]>
Co-authored-by: Roman Zavarnitsyn <[email protected]>
Co-authored-by: Nicholas Meisenheimer <[email protected]>
Co-authored-by: Matt Johnson-Pint <[email protected]>
Co-authored-by: Stefan Jandl <[email protected]>
Co-authored-by: Jérémy Barbet <[email protected]>
Co-authored-by: Leander Rodrigues <[email protected]>
Co-authored-by: LucasZF <[email protected]>
Co-authored-by: Iker Barriocanal <[email protected]>
Co-authored-by: Scott Cooper <[email protected]>
Co-authored-by: Denis Andrašec <[email protected]>
Co-authored-by: Shruthi <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Jun 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants