@opentelemetry/instrumentation-cucumber
v0.37.0
Published
OpenTelemetry instrumentation for `@cucumber/cucumber` automated tests runner
Readme
OpenTelemetry Cucumber Instrumentation for Node.js
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-cucumberSupported Versions
@cucumber/cucumberversions>=8.0.0 <13
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. |
Useful links
- For more information on OpenTelemetry, visit: https://opentelemetry.io/
- For more about OpenTelemetry JavaScript: https://github.com/open-telemetry/opentelemetry-js
- For help or feedback on this project, join us in GitHub Discussions
License
Apache 2.0 - See LICENSE for more information.
