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

Allows to add a custom stacktrace through the log API #184

Merged
merged 6 commits into from
Feb 26, 2025

Conversation

ArielDemarco
Copy link
Collaborator

@ArielDemarco ArielDemarco commented Feb 20, 2025

Overview

This PR adds a new stack trace case to the StackTraceBehavior enum: custom(_ value: EmbraceStackTrace).

This allows SDK clients to add their own stack traces to logs, which can be useful, for example, when dealing with past events.

EmbraceStackTrace includes all necessary validations to ensure the stack trace (and its frames) adhere to the required format. By design, it throws an error (EmbraceStackTraceError) when attempting to create an invalid stack trace that cannot be used later by Embrace.

Limits & Format:

  • Each frame should follow the format: <index> <image> <memory address> <symbol> [ + <offset> ]. The "+ <offset>" part is optional.
  • Each frame cannot be longer than 10.000 characters.
  • We'll trim stacktraces with more than 200 frames.

@ArielDemarco ArielDemarco requested a review from a team as a code owner February 20, 2025 19:58
Copy link

github-actions bot commented Feb 20, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

Copy link

github-actions bot commented Feb 20, 2025

Warnings
⚠️ No CHANGELOG entry added.

Generated by 🚫 Danger Swift against b962204

@ArielDemarco ArielDemarco merged commit a5d957a into main Feb 26, 2025
7 of 8 checks passed
@ArielDemarco ArielDemarco deleted the add-custom-stacktrace-to-log branch February 26, 2025 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants