Skip to content

notrab/sentry-integration-libsql-client

Repository files navigation

sentry-integration-libsql-client

This is a Node integration for Sentry that adds support for @libsql/client.

NPM

Install

npm install sentry-integration-libsql-client

Make sure to install @libsql/client if you don't already have it.

Quickstart

import { createClient } from "@libsql/client";
import * as Sentry from "@sentry/node";
import { libsqlIntegration } from "sentry-integration-libsql-client";

const libsqlClient = createClient({
  url: "libsql://...",
  authToken: "...",
});

Sentry.init({
  dsn: "...",
  integrations: [
    libsqlIntegration(libsqlClient, Sentry, {
      tracing: true,
      breadcrumbs: true,
      errors: true,
    }),
  ],
});

await libsqlClient.execute("SELECT * FROM users");

Not yet got a database?

  1. Create Database
  2. Copy the Database URL, and create an auth token for your database
  3. Install the libSQL SDK
npm install @libsql/client