Is it possible to manually capture sentry errors or increment metrics from a function? I can do it

Is it possible to manually capture sentry errors or increment metrics from a function? I can do it on the front end, and with the pages plugin/middleware thing I can capture exceptions, but manually capturing with like Sentry.captureMessage (using the react SDK) doesn’t work. Is there a different sdk or even an api wrapper I can use for that?
Was this page helpful?