npm.io
0.37.0 • Published 1 month ago

@opentelemetry/instrumentation-cucumber

Licence
Apache-2.0
Version
0.37.0
Deps
2
Size
56 kB
Vulns
0
Weekly
0
Stars
916

OpenTelemetry Cucumber Instrumentation for Node.js

NPM Published Version Apache License

This module provides automatic instrumentation for the @cucumber/cucumber module.

If total installation size is not constrained, it is recommended to use the @opentelemetry/auto-instrumentations-node bundle with @opentelemetry/sdk-node for the most seamless instrumentation experience.

Compatible with OpenTelemetry JS API and SDK 1.0+.

Installation

npm install --save @opentelemetry/instrumentation-cucumber

Supported Versions

Usage

const { NodeSDK } = require('@opentelemetry/sdk-node');
const { CucumberInstrumentation } = require('@opentelemetry/instrumentation-cucumber');

const sdk = new NodeSDK({
  instrumentations: [
    new CucucmberInstrumentation({
      // see below for available configuration
    }),
  ],
});
sdk.start();
process.once('beforeExit', async () => { await sdk.shutdown(); });
Cucumber Instrumentation Options

Cucumber instrumentation has currently no options.

Options Type Description

Semantic Conventions

This package uses @opentelemetry/semantic-conventions version 1.22+, which implements Semantic Convention Version 1.7.0

Attributes collected:

Attribute Short Description
code.file.path The source code file name that identifies the code unit as uniquely as possible.
code.function.name The method or function fully-qualified name without arguments.
code.line.number The line number in code.file.path best representing the operation.

License

Apache 2.0 - See LICENSE for more information.

Keywords