@opentelemetry/instrumentation-bunyan
Advanced tools
Comparing version 0.40.0 to 0.41.0
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation'; | ||
import { BunyanInstrumentationConfig } from './types'; | ||
export declare class BunyanInstrumentation extends InstrumentationBase { | ||
export declare class BunyanInstrumentation extends InstrumentationBase<BunyanInstrumentationConfig> { | ||
constructor(config?: BunyanInstrumentationConfig); | ||
protected init(): InstrumentationNodeModuleDefinition[]; | ||
getConfig(): BunyanInstrumentationConfig; | ||
setConfig(config?: BunyanInstrumentationConfig): void; | ||
@@ -8,0 +7,0 @@ private _getPatchedEmit; |
@@ -31,3 +31,3 @@ "use strict"; | ||
constructor(config = {}) { | ||
super(version_1.PACKAGE_NAME, version_1.PACKAGE_VERSION, Object.assign({}, DEFAULT_CONFIG, config)); | ||
super(version_1.PACKAGE_NAME, version_1.PACKAGE_VERSION, Object.assign(Object.assign({}, DEFAULT_CONFIG), config)); | ||
} | ||
@@ -76,7 +76,4 @@ init() { | ||
} | ||
getConfig() { | ||
return this._config; | ||
} | ||
setConfig(config = {}) { | ||
this._config = Object.assign({}, DEFAULT_CONFIG, config); | ||
super.setConfig(Object.assign(Object.assign({}, DEFAULT_CONFIG), config)); | ||
} | ||
@@ -136,7 +133,7 @@ _getPatchedEmit() { | ||
_callHook(span, record) { | ||
const hook = this.getConfig().logHook; | ||
if (typeof hook !== 'function') { | ||
const { logHook } = this.getConfig(); | ||
if (typeof logHook !== 'function') { | ||
return; | ||
} | ||
(0, instrumentation_1.safeExecuteInTheMiddle)(() => hook(span, record), err => { | ||
(0, instrumentation_1.safeExecuteInTheMiddle)(() => logHook(span, record), err => { | ||
if (err) { | ||
@@ -143,0 +140,0 @@ this._diag.error('error calling logHook', err); |
@@ -1,3 +0,3 @@ | ||
export declare const PACKAGE_VERSION = "0.40.0"; | ||
export declare const PACKAGE_VERSION = "0.41.0"; | ||
export declare const PACKAGE_NAME = "@opentelemetry/instrumentation-bunyan"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,4 +20,4 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.PACKAGE_VERSION = '0.40.0'; | ||
exports.PACKAGE_VERSION = '0.41.0'; | ||
exports.PACKAGE_NAME = '@opentelemetry/instrumentation-bunyan'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/instrumentation-bunyan", | ||
"version": "0.40.0", | ||
"version": "0.41.0", | ||
"description": "OpenTelemetry instrumentation for `bunyan` logger", | ||
@@ -49,13 +49,13 @@ "main": "build/src/index.js", | ||
"@opentelemetry/resources": "^1.8.0", | ||
"@opentelemetry/sdk-logs": "^0.52.0", | ||
"@opentelemetry/sdk-logs": "^0.53.0", | ||
"@opentelemetry/sdk-trace-base": "^1.8.0", | ||
"@opentelemetry/sdk-trace-node": "^1.8.0", | ||
"@opentelemetry/semantic-conventions": "^1.23.0", | ||
"@opentelemetry/semantic-conventions": "^1.27.0", | ||
"@types/mocha": "7.0.2", | ||
"@types/node": "18.6.5", | ||
"@types/sinon": "10.0.18", | ||
"@types/sinon": "10.0.20", | ||
"bunyan": "1.8.15", | ||
"mocha": "7.2.0", | ||
"nyc": "15.1.0", | ||
"rimraf": "5.0.5", | ||
"rimraf": "5.0.10", | ||
"sinon": "15.2.0", | ||
@@ -67,8 +67,8 @@ "test-all-versions": "6.1.0", | ||
"dependencies": { | ||
"@opentelemetry/api-logs": "^0.52.0", | ||
"@opentelemetry/instrumentation": "^0.52.0", | ||
"@opentelemetry/api-logs": "^0.53.0", | ||
"@opentelemetry/instrumentation": "^0.53.0", | ||
"@types/bunyan": "1.8.9" | ||
}, | ||
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-bunyan#readme", | ||
"gitHead": "ad8436d6a4174f2288cb939080cd4e74da94b0d7" | ||
"gitHead": "9dc58afed8134f95908331bcff35c5d9ec46fe9a" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63235
457
+ Added@opentelemetry/api-logs@0.53.0(transitive)
+ Added@opentelemetry/instrumentation@0.53.0(transitive)
- Removed@opentelemetry/api-logs@0.52.1(transitive)
- Removed@opentelemetry/instrumentation@0.52.1(transitive)