This package has been deprecated

Author message:

Deprecated in favor of opentelemetry-instrumentation-kafkajs

opentelemetry-plugin-kafkajs
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

OpenTelemetry kafkajs Instrumentation for Node.js

NPM version

This module provides automatic instrumentation for kafkajs.

Installation

npm install --save opentelemetry-plugin-kafkajs

Usage

To load a specific plugin (kafkajs in this case), specify it in the Node Tracer's configuration

const { NodeTracerProvider } = require("@opentelemetry/node");

const provider = new NodeTracerProvider({
  plugins: {
    kafkajs: {
      enabled: true,
      // You may use a package name or absolute path to the file.
      path: "opentelemetry-plugin-kafkajs",
    },
  },
});

kafkajs Plugin Options

kafkajs plugin has few options available to choose from. You can set the following:

Options Type Description
producerHook KafkaProducerCustomAttributeFunction Hook called before producer message is sent, which allow to add custom attributes to span.
consumerHook KafkaConsumerCustomAttributeFunction Hook called before consumer message is processed, which allow to add custom attributes to span.

This extension (and many others) was developed by Aspecto with ❤️

Package Sidebar

Install

npm i opentelemetry-plugin-kafkajs

Weekly Downloads

1,091

Version

0.2.0

License

Apache-2.0

Unpacked Size

29.8 kB

Total Files

14

Last publish

Collaborators

  • amir.aspecto
  • aspecto-release-bot