0.0.37 • Published 4 years ago

@mzahor-test-org/open-telemetry-kafka-node v0.0.37

Weekly downloads
1
License
Apache-2.0
Repository
-
Last release
4 years ago

OpenTelemetry kafka-node Instrumentation for Node.js

This module provides automatic instrumentation for kafka-node.

Installation

npm install --save @mzahor-test-org/open-telemetry-kafka-node

Usage

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

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

const provider = new NodeTracerProvider({
  plugins: {
    'kafka-node': {
      enabled: true,
      // You may use a package name or absolute path to the file.
      path: '@mzahor-test-org/open-telemetry-kafka-node',
    }
  }
});

kafka-node Plugin Options

kafka-node plugin has few options available to choose from. You can set the following:

OptionsTypeDescription
producerHookKafkaProducerCustomAttributeFunctionHook called before producer message is sent, which allow to add custom attributes to span.
consumerHookKafkaConsumerCustomAttributeFunctionHook called before consumer message is processed, which allow to add custom attributes to span.

Known Issues

  • This library instrument only the Producer and Consumer.
  • Due to the lack of support in kafka-node in message headers, there is currently no context propagation between producers and consumers.
0.0.33

4 years ago

0.0.34

4 years ago

0.0.35

4 years ago

0.0.36

4 years ago

0.0.37

4 years ago

0.0.32

4 years ago

0.0.31

4 years ago

0.0.30

4 years ago

0.0.29

4 years ago

0.0.28

4 years ago

0.0.26

4 years ago