Skip to content

Sentry middleware for Zustand #5430

@Thanaen

Description

@Thanaen

Problem Statement

Hello,
Today, Sentry makes available a method to create a redux store enhancer easily, and thus log actions and values of a redux state.
There is no equivalent for the Zustand library yet.

Solution Brainstorm

Do you think it would be possible to create, in the same philosophy, a middleware for the Zustand library (https://github.com/pmndrs/zustand) that would log the actions and the last value of the state?

According to the Zustand documentation, it seems that it is necessary to use middlewares for that (https://github.com/pmndrs/zustand/blob/main/docs/typescript.md#using-middlewares)

I'll try to tinker with one on my side, but having an "official" one would make me feel better 😄. It might not be necessary to integrate it as code in the sentry-javascript package, it could just be written in a wiki or documentation.

Thanks a lot in advance

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions