Skip to content

Plugins

autotel-plugins instruments libraries that have no official OpenTelemetry package or where official support is broken.

Only includes instrumentation that:

  1. Has NO official OpenTelemetry package
  2. Has BROKEN official instrumentation
  3. Adds significant value beyond official packages
Terminal window
npm install autotel autotel-plugins
import { BigQuery } from '@google-cloud/bigquery';
import { instrumentBigQuery } from 'autotel-plugins/bigquery';
const client = new BigQuery();
instrumentBigQuery(client);
// All queries are now traced with SQL text, dataset, and job metadata
const [rows] = await client.query('SELECT * FROM mydataset.mytable');

Kafka has its own package: see Kafka. autotel-plugins/kafka re-exports autotel-kafka and is deprecated.

import { withConsumeSpan } from 'autotel-plugins/rabbitmq';
channel.consume('orders', async (msg) => {
if (!msg) return;
await withConsumeSpan(
{
name: 'order.process',
headers: msg.properties.headers,
contextMode: 'inherit',
queue: 'orders',
},
async () => {
await processOrder(msg);
channel.ack(msg);
},
);
});
  • example-pg: PostgreSQL with official @opentelemetry/instrumentation-pg and autotel.
  • example-prisma: Prisma ORM with PrismaInstrumentation showing detailed span trees.

For libraries with working official instrumentation, use those directly:

Library Official Package
MongoDB @opentelemetry/instrumentation-mongodb
PostgreSQL @opentelemetry/instrumentation-pg
MySQL @opentelemetry/instrumentation-mysql2
Redis @opentelemetry/instrumentation-redis
Express @opentelemetry/instrumentation-express
  • autotel-plugins/bigquery: BigQuery instrumentation
  • autotel-plugins/kafka: deprecated re-export of autotel-kafka
  • autotel-plugins/rabbitmq: RabbitMQ instrumentation