Socket
Socket
Sign inDemoInstall

@opentelemetry/instrumentation

Package Overview
Dependencies
Maintainers
2
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/instrumentation - npm Package Compare versions

Comparing version 0.33.0 to 0.34.0

build/esm/platform/node/ModuleNameTrie.d.ts

3

build/esm/autoLoader.js

@@ -16,4 +16,3 @@ /*

*/
import { trace } from '@opentelemetry/api';
import { metrics } from '@opentelemetry/api-metrics';
import { trace, metrics } from '@opentelemetry/api';
import { disableInstrumentations, enableInstrumentations, parseInstrumentationOptions, } from './autoLoaderUtils';

@@ -20,0 +19,0 @@ /**

@@ -1,3 +0,2 @@

import { TracerProvider } from '@opentelemetry/api';
import { MeterProvider } from '@opentelemetry/api-metrics';
import { TracerProvider, MeterProvider } from '@opentelemetry/api';
import { Instrumentation } from './types';

@@ -4,0 +3,0 @@ import { AutoLoaderResult, InstrumentationOption } from './types_internal';

@@ -1,3 +0,2 @@

import { DiagLogger, Tracer, TracerProvider } from '@opentelemetry/api';
import { Meter, MeterProvider } from '@opentelemetry/api-metrics';
import { DiagLogger, Meter, MeterProvider, Tracer, TracerProvider } from '@opentelemetry/api';
import { InstrumentationModuleDefinition } from './platform/node';

@@ -4,0 +3,0 @@ import * as types from './types';

@@ -27,4 +27,3 @@ /*

};
import { diag, trace, } from '@opentelemetry/api';
import { metrics } from '@opentelemetry/api-metrics';
import { diag, metrics, trace, } from '@opentelemetry/api';
import * as shimmer from 'shimmer';

@@ -31,0 +30,0 @@ /**

@@ -9,2 +9,3 @@ import * as types from '../../types';

private _hooks;
private _requireInTheMiddleSingleton;
private _enabled;

@@ -11,0 +12,0 @@ constructor(instrumentationName: string, instrumentationVersion: string, config?: types.InstrumentationConfig);

@@ -43,5 +43,5 @@ /*

import * as path from 'path';
import * as RequireInTheMiddle from 'require-in-the-middle';
import { satisfies } from 'semver';
import { InstrumentationAbstract } from '../../instrumentation';
import { RequireInTheMiddleSingleton } from './RequireInTheMiddleSingleton';
import { diag } from '@opentelemetry/api';

@@ -57,2 +57,3 @@ /**

_this._hooks = [];
_this._requireInTheMiddleSingleton = RequireInTheMiddleSingleton.getInstance();
_this._enabled = false;

@@ -65,4 +66,5 @@ var modules = _this.init();

if (_this._modules.length === 0) {
diag.warn('No modules instrumentation has been defined,' +
' nothing will be patched');
diag.debug('No modules instrumentation has been defined for ' +
("'" + _this.instrumentationName + "@" + _this.instrumentationVersion + "'") +
', nothing will be patched');
}

@@ -183,3 +185,3 @@ if (_this._config.enabled) {

var _loop_1 = function (module_2) {
this_1._hooks.push(RequireInTheMiddle([module_2.name], { internals: true }, function (exports, name, baseDir) {
this_1._hooks.push(this_1._requireInTheMiddleSingleton.register(module_2.name, function (exports, name, baseDir) {
return _this._onRequire(module_2, exports, name, baseDir);

@@ -186,0 +188,0 @@ }));

@@ -1,3 +0,2 @@

import { TracerProvider } from '@opentelemetry/api';
import { MeterProvider } from '@opentelemetry/api-metrics';
import { TracerProvider, MeterProvider } from '@opentelemetry/api';
import { InstrumentationBase } from './platform';

@@ -4,0 +3,0 @@ import { Instrumentation } from './types';

@@ -1,3 +0,2 @@

import { TracerProvider } from '@opentelemetry/api';
import { MeterProvider } from '@opentelemetry/api-metrics';
import { TracerProvider, MeterProvider } from '@opentelemetry/api';
/** Interface Instrumentation to apply patch. */

@@ -4,0 +3,0 @@ export interface Instrumentation {

@@ -1,2 +0,2 @@

export declare const VERSION = "0.33.0";
export declare const VERSION = "0.34.0";
//# sourceMappingURL=version.d.ts.map

@@ -17,3 +17,3 @@ /*

// this is autogenerated file, see scripts/version-update.js
export var VERSION = '0.33.0';
export var VERSION = '0.34.0';
//# sourceMappingURL=version.js.map

@@ -16,4 +16,3 @@ /*

*/
import { trace } from '@opentelemetry/api';
import { metrics } from '@opentelemetry/api-metrics';
import { trace, metrics } from '@opentelemetry/api';
import { disableInstrumentations, enableInstrumentations, parseInstrumentationOptions, } from './autoLoaderUtils';

@@ -20,0 +19,0 @@ /**

@@ -1,3 +0,2 @@

import { TracerProvider } from '@opentelemetry/api';
import { MeterProvider } from '@opentelemetry/api-metrics';
import { TracerProvider, MeterProvider } from '@opentelemetry/api';
import { Instrumentation } from './types';

@@ -4,0 +3,0 @@ import { AutoLoaderResult, InstrumentationOption } from './types_internal';

@@ -1,3 +0,2 @@

import { DiagLogger, Tracer, TracerProvider } from '@opentelemetry/api';
import { Meter, MeterProvider } from '@opentelemetry/api-metrics';
import { DiagLogger, Meter, MeterProvider, Tracer, TracerProvider } from '@opentelemetry/api';
import { InstrumentationModuleDefinition } from './platform/node';

@@ -4,0 +3,0 @@ import * as types from './types';

@@ -16,4 +16,3 @@ /*

*/
import { diag, trace, } from '@opentelemetry/api';
import { metrics } from '@opentelemetry/api-metrics';
import { diag, metrics, trace, } from '@opentelemetry/api';
import * as shimmer from 'shimmer';

@@ -20,0 +19,0 @@ /**

@@ -9,2 +9,3 @@ import * as types from '../../types';

private _hooks;
private _requireInTheMiddleSingleton;
private _enabled;

@@ -11,0 +12,0 @@ constructor(instrumentationName: string, instrumentationVersion: string, config?: types.InstrumentationConfig);

@@ -17,5 +17,5 @@ /*

import * as path from 'path';
import * as RequireInTheMiddle from 'require-in-the-middle';
import { satisfies } from 'semver';
import { InstrumentationAbstract } from '../../instrumentation';
import { RequireInTheMiddleSingleton } from './RequireInTheMiddleSingleton';
import { diag } from '@opentelemetry/api';

@@ -29,2 +29,3 @@ /**

this._hooks = [];
this._requireInTheMiddleSingleton = RequireInTheMiddleSingleton.getInstance();
this._enabled = false;

@@ -37,4 +38,5 @@ let modules = this.init();

if (this._modules.length === 0) {
diag.warn('No modules instrumentation has been defined,' +
' nothing will be patched');
diag.debug('No modules instrumentation has been defined for ' +
`'${this.instrumentationName}@${this.instrumentationVersion}'` +
', nothing will be patched');
}

@@ -130,3 +132,3 @@ if (this._config.enabled) {

for (const module of this._modules) {
this._hooks.push(RequireInTheMiddle([module.name], { internals: true }, (exports, name, baseDir) => {
this._hooks.push(this._requireInTheMiddleSingleton.register(module.name, (exports, name, baseDir) => {
return this._onRequire(module, exports, name, baseDir);

@@ -133,0 +135,0 @@ }));

@@ -1,3 +0,2 @@

import { TracerProvider } from '@opentelemetry/api';
import { MeterProvider } from '@opentelemetry/api-metrics';
import { TracerProvider, MeterProvider } from '@opentelemetry/api';
import { InstrumentationBase } from './platform';

@@ -4,0 +3,0 @@ import { Instrumentation } from './types';

@@ -1,3 +0,2 @@

import { TracerProvider } from '@opentelemetry/api';
import { MeterProvider } from '@opentelemetry/api-metrics';
import { TracerProvider, MeterProvider } from '@opentelemetry/api';
/** Interface Instrumentation to apply patch. */

@@ -4,0 +3,0 @@ export interface Instrumentation {

@@ -1,2 +0,2 @@

export declare const VERSION = "0.33.0";
export declare const VERSION = "0.34.0";
//# sourceMappingURL=version.d.ts.map

@@ -17,3 +17,3 @@ /*

// this is autogenerated file, see scripts/version-update.js
export const VERSION = '0.33.0';
export const VERSION = '0.34.0';
//# sourceMappingURL=version.js.map

@@ -20,3 +20,2 @@ "use strict";

const api_1 = require("@opentelemetry/api");
const api_metrics_1 = require("@opentelemetry/api-metrics");
const autoLoaderUtils_1 = require("./autoLoaderUtils");

@@ -32,3 +31,3 @@ /**

const tracerProvider = options.tracerProvider || api_1.trace.getTracerProvider();
const meterProvider = options.meterProvider || api_metrics_1.metrics.getMeterProvider();
const meterProvider = options.meterProvider || api_1.metrics.getMeterProvider();
(0, autoLoaderUtils_1.enableInstrumentations)(instrumentations, tracerProvider, meterProvider);

@@ -35,0 +34,0 @@ return () => {

@@ -1,3 +0,2 @@

import { TracerProvider } from '@opentelemetry/api';
import { MeterProvider } from '@opentelemetry/api-metrics';
import { TracerProvider, MeterProvider } from '@opentelemetry/api';
import { Instrumentation } from './types';

@@ -4,0 +3,0 @@ import { AutoLoaderResult, InstrumentationOption } from './types_internal';

@@ -1,3 +0,2 @@

import { DiagLogger, Tracer, TracerProvider } from '@opentelemetry/api';
import { Meter, MeterProvider } from '@opentelemetry/api-metrics';
import { DiagLogger, Meter, MeterProvider, Tracer, TracerProvider } from '@opentelemetry/api';
import { InstrumentationModuleDefinition } from './platform/node';

@@ -4,0 +3,0 @@ import * as types from './types';

@@ -20,3 +20,2 @@ "use strict";

const api_1 = require("@opentelemetry/api");
const api_metrics_1 = require("@opentelemetry/api-metrics");
const shimmer = require("shimmer");

@@ -43,3 +42,3 @@ /**

this._tracer = api_1.trace.getTracer(instrumentationName, instrumentationVersion);
this._meter = api_metrics_1.metrics.getMeter(instrumentationName, instrumentationVersion);
this._meter = api_1.metrics.getMeter(instrumentationName, instrumentationVersion);
}

@@ -46,0 +45,0 @@ /* Returns meter */

@@ -9,2 +9,3 @@ import * as types from '../../types';

private _hooks;
private _requireInTheMiddleSingleton;
private _enabled;

@@ -11,0 +12,0 @@ constructor(instrumentationName: string, instrumentationVersion: string, config?: types.InstrumentationConfig);

@@ -20,5 +20,5 @@ "use strict";

const path = require("path");
const RequireInTheMiddle = require("require-in-the-middle");
const semver_1 = require("semver");
const instrumentation_1 = require("../../instrumentation");
const RequireInTheMiddleSingleton_1 = require("./RequireInTheMiddleSingleton");
const api_1 = require("@opentelemetry/api");

@@ -32,2 +32,3 @@ /**

this._hooks = [];
this._requireInTheMiddleSingleton = RequireInTheMiddleSingleton_1.RequireInTheMiddleSingleton.getInstance();
this._enabled = false;

@@ -40,4 +41,5 @@ let modules = this.init();

if (this._modules.length === 0) {
api_1.diag.warn('No modules instrumentation has been defined,' +
' nothing will be patched');
api_1.diag.debug('No modules instrumentation has been defined for ' +
`'${this.instrumentationName}@${this.instrumentationVersion}'` +
', nothing will be patched');
}

@@ -133,3 +135,3 @@ if (this._config.enabled) {

for (const module of this._modules) {
this._hooks.push(RequireInTheMiddle([module.name], { internals: true }, (exports, name, baseDir) => {
this._hooks.push(this._requireInTheMiddleSingleton.register(module.name, (exports, name, baseDir) => {
return this._onRequire(module, exports, name, baseDir);

@@ -136,0 +138,0 @@ }));

@@ -1,3 +0,2 @@

import { TracerProvider } from '@opentelemetry/api';
import { MeterProvider } from '@opentelemetry/api-metrics';
import { TracerProvider, MeterProvider } from '@opentelemetry/api';
import { InstrumentationBase } from './platform';

@@ -4,0 +3,0 @@ import { Instrumentation } from './types';

@@ -1,3 +0,2 @@

import { TracerProvider } from '@opentelemetry/api';
import { MeterProvider } from '@opentelemetry/api-metrics';
import { TracerProvider, MeterProvider } from '@opentelemetry/api';
/** Interface Instrumentation to apply patch. */

@@ -4,0 +3,0 @@ export interface Instrumentation {

@@ -1,2 +0,2 @@

export declare const VERSION = "0.33.0";
export declare const VERSION = "0.34.0";
//# sourceMappingURL=version.d.ts.map

@@ -20,3 +20,3 @@ "use strict";

// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '0.33.0';
exports.VERSION = '0.34.0';
//# sourceMappingURL=version.js.map
{
"name": "@opentelemetry/instrumentation",
"version": "0.33.0",
"version": "0.34.0",
"description": "Base class for node which OpenTelemetry instrumentation modules extend",

@@ -71,3 +71,2 @@ "author": "OpenTelemetry Authors",

"dependencies": {
"@opentelemetry/api-metrics": "0.33.0",
"require-in-the-middle": "^5.0.3",

@@ -78,8 +77,8 @@ "semver": "^7.3.2",

"peerDependencies": {
"@opentelemetry/api": "^1.0.0"
"@opentelemetry/api": "^1.3.0"
},
"devDependencies": {
"@babel/core": "7.16.0",
"@opentelemetry/api": "^1.0.0",
"@types/mocha": "9.1.1",
"@opentelemetry/api": "^1.3.0",
"@types/mocha": "10.0.0",
"@types/node": "18.6.5",

@@ -114,3 +113,4 @@ "@types/semver": "7.3.9",

},
"gitHead": "ad88c3d9aa0100fe259b93f4b660e84417b757ac"
"sideEffects": false,
"gitHead": "7972edf6659fb6e0d5928a5cf7a35f26683e168f"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc