---
title: "Knex"
description: "Adds instrumentation for Knex."
url: https://docs.sentry.io/platforms/javascript/guides/connect/configuration/integrations/knex/
---

# Knex | Sentry for Connect

This integration only works in the Node.js and Bun runtimes. Requires SDK version `8.38.0` or higher.

*Import name: `Sentry.knexIntegration`*

The `knexIntegration` adds instrumentation for the `knex` library to capture spans using [`@opentelemetry/instrumentation-knex`](https://www.npmjs.com/package/@opentelemetry/instrumentation-knex).

```javascript
Sentry.init({
  integrations: [Sentry.knexIntegration()],
});
```

## [Supported Versions](https://docs.sentry.io/platforms/javascript/guides/connect/configuration/integrations/knex.md#supported-versions)

* `dataloader`: `>=0.10.0 <4`
