Skip to content

Store Ash bread crumbs in occurrence context #106

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

Merged
merged 1 commit into from
Nov 9, 2024

Conversation

crbelaus
Copy link
Contributor

@crbelaus crbelaus commented Nov 7, 2024

Some frameworks such as Ash include breadcrumbs in their errors. This is provided by the fantastic Splode library (details).

This commit updates the ErrorTracker to detect such bread crumbs and include them in the occurrence context. In the future we may want to revisit this and store them in their own field separate from the context.

It is important to note that you don't have to use Ash or Splode to leverage this integration. Breadcrumbs will be automatically extracted from any exception that includes a bread_crumbs field.

I've discussed this with @zachdaniel and he kindly integrated the breadcrumbs on Ash main for create and change actions.

To test this you can clone the Ash Realworld example project and update the ash dependency to main with {:ash, github: "ash-project/ash", override: true}. Here is a screenshot of how it looks like:

image

@crbelaus crbelaus requested a review from odarriba November 7, 2024 16:00
@crbelaus crbelaus self-assigned this Nov 7, 2024
Some frameworks such as Ash provide bread crumbs in their errors. This
commit records those breadcrumbs and stores them in the occurrence
context.
@crbelaus crbelaus force-pushed the bread-crumbs-in-context branch from 76661f0 to 8b72136 Compare November 7, 2024 16:01
@odarriba odarriba merged commit 428f4c7 into main Nov 9, 2024
3 checks passed
@odarriba odarriba deleted the bread-crumbs-in-context branch November 9, 2024 11:07
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.

2 participants