0.30.0 • Published 6 days ago
opentelemetry-propagator-selective v0.30.0
OpenTelemetry Propagator Selective for Node.js
This module provides TextMapPropagator which wraps another propagator and apply inject and extract selectively according to configuration.
Installation
npm install --save opentelemetry-propagator-selective
Usage
Example usage with B3 Propagator
import { SelectivePropagator } from 'opentelemetry-propagator-selective';
import { B3Propagator } from '@opentelemetry/propagator-b3';
import { propagation } from '@opentelemetry/api';
const b3ExtractOnly = new SelectivePropagator(new B3Propagator(), { extractEnabled: true, injectEnabled: false});
propagation.setGlobalPropagator(b3ExtractOnly);
You can use any propagator compatible with the TextMapPropagator
interface.
Configuration
- You can set
extractEnabled
andinjectEnabled
to boolean values to set which operations are valid. - It is possible to set both to true or both to false.
- If not set, default is to not
inject
/extract
0.0.0-2024-05-16--12-47
6 days ago
0.0.0-2023-10-17--13-06
7 months ago
0.30.0
7 months ago
0.0.0-2023-07-26--14-48
10 months ago
0.29.0
2 years ago
0.0.0-2022-07-11--08-09
2 years ago
0.28.1
2 years ago
0.0.0-2022-04-13--14-32
2 years ago
0.28.0
2 years ago
0.0.0-2021-12-26--12-31
2 years ago