nirsky-test-neo4j
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

OpenTelemetry Neo4j Instrumentation for Node.js

NPM version

This module provides automatic instrumentation for neo4j-javascript-driver.

Supports versions >=4.0.0 of neo4j-driver

Installation

npm install --save opentelemetry-instrumentation-neo4j

Usage

For further automatic instrumentation instruction see the @opentelemetry/instrumentation package.

const { NodeTracerProvider } = require('@opentelemetry/node');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const { Neo4jInstrumentation } = require('opentelemetry-instrumentation-neo4j');

registerInstrumentations({
  traceProvider,
  instrumentations: [
    new Neo4jInstrumentation({
      // see under for available configuration
    })
  ]
});

Neo4j Instrumentation Options

Neo4j instrumentation has few options available to choose from. You can set the following:

Options Type Description
responseHook Neo4jResponseCustomAttributesFunction Hook called before response is returned, which allows to add custom attributes to span.
ignoreOrphanedSpans boolean Set to true if you only want to trace operation which has parent spans
moduleVersionAttributeName string If passed, a span attribute will be added to all spans with key of the provided moduleVersionAttributeName and value of the patched module version

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

Package Sidebar

Install

npm i nirsky-test-neo4j

Weekly Downloads

1

Version

0.2.1

License

Apache-2.0

Unpacked Size

92.8 kB

Total Files

31

Last publish

Collaborators

  • nirsky