@opentelemetry/instrumentation-fs
OpenTelemetry instrumentation for `node:fs` file system interactions module
Last updated 16 days ago by GitHub Actions .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @opentelemetry/instrumentation-fs 
SYNC missed versions from official npm registry.

OpenTelemetry fs Instrumentation for Node.js

NPM Published Version Apache License

This module provides automatic instrumentation for the fs module, which can be registered using the @opentelemetry/instrumentation package.

Compatible with OpenTelemetry JS API 1.3+.

See the full list of instrumented functions in constants.ts;

Installation

npm install --save @opentelemetry/instrumentation-fs

Supported Versions

  • Node.js >=18

Usage

const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
const { FsInstrumentation } = require('@opentelemetry/instrumentation-fs');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');

const provider = new NodeTracerProvider();
provider.register();

registerInstrumentations({
  instrumentations: [
    new FsInstrumentation({
      // see below for available configuration
    }),
  ],
});

Instrumentation Options

You can set the following:

Options Type Description
createHook (functionName: FMember \| FPMember, info: { args: ArrayLike<unknown> }) => boolean Hook called before creating the span. If false is returned this and all the sibling calls will not be traced.
endHook ( functionName: FMember \| FPMember, info: { args: ArrayLike<unknown>; span: api.Span } ) => void Function called just before the span is ended. Useful for adding attributes.
requireParentSpan boolean Require parent to create fs span, default when unset is false.

Semantic Conventions

This package does not currently generate any attributes from semantic conventions.

Useful links

License

Apache 2.0 - See LICENSE for more information.

Current Tags

  • 0.33.0                                ...           latest (16 days ago)

44 Versions

  • 0.33.0                                ...           16 days ago
  • 0.32.0                                ...           a month ago
  • 0.31.0                                ...           2 months ago
  • 0.30.0                                ...           3 months ago
  • 0.29.0                                ...           3 months ago
  • 0.28.0                                ...           5 months ago
  • 0.27.0                                ...           6 months ago
  • 0.26.0                                ...           6 months ago
  • 0.25.2                                ...           6 months ago
  • 0.25.1                                ...           6 months ago
  • 0.25.0                                ...           7 months ago
  • 0.24.0                                ...           7 months ago
  • 0.23.0                                ...           9 months ago
  • 0.22.0                                ...           10 months ago
  • 0.21.0                                ...           a year ago
  • 0.20.0                                ...           a year ago
  • 0.19.1                                ...           a year ago
  • 0.19.0                                ...           a year ago
  • 0.18.0                                ...           a year ago
  • 0.17.0                                ...           a year ago
  • 0.16.0                                ...           a year ago
  • 0.15.0                                ...           2 years ago
  • 0.14.0                                ...           2 years ago
  • 0.13.0                                ...           2 years ago
  • 0.12.0                                ...           2 years ago
  • 0.11.0                                ...           2 years ago
  • 0.10.0                                ...           2 years ago
  • 0.9.0                                ...           2 years ago
  • 0.8.4                                ...           2 years ago
  • 0.8.3                                ...           2 years ago
  • 0.8.2                                ...           3 years ago
  • 0.8.1                                ...           3 years ago
  • 0.8.0                                ...           3 years ago
  • 0.7.4                                ...           3 years ago
  • 0.7.3                                ...           3 years ago
  • 0.7.2                                ...           3 years ago
  • 0.7.1                                ...           3 years ago
  • 0.7.0                                ...           3 years ago
  • 0.6.0                                ...           3 years ago
  • 0.5.1                                ...           3 years ago
  • 0.5.0                                ...           4 years ago
  • 0.4.0                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
Downloads
Today 0
This Week 0
This Month 24
Last Day 0
Last Week 24
Last Month 0
Dependencies (2)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |