@jenniferplusplus/opentelemetry-instrumentation-bullmq
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -31,6 +31,7 @@ "use strict"; | ||
init() { | ||
return new instrumentation_1.InstrumentationNodeModuleDefinition('bullmq', ['1.*', '2.*'], this._onPatchMain(), this._onUnPatchMain()); | ||
return new instrumentation_1.InstrumentationNodeModuleDefinition('bullmq', ['1.*', '2.*', '3.*'], this._onPatchMain(), this._onUnPatchMain()); | ||
} | ||
_onPatchMain() { | ||
return (moduleExports) => { | ||
this._diag.debug('patching'); | ||
// As Spans | ||
@@ -54,2 +55,3 @@ this._wrap(moduleExports.Queue.prototype, 'add', this._patchQueueAdd()); | ||
return (moduleExports) => { | ||
this._diag.debug('un-patching'); | ||
this._unwrap(moduleExports.Queue.prototype, 'add'); | ||
@@ -252,2 +254,3 @@ this._unwrap(moduleExports.Queue.prototype, 'addBulk'); | ||
[attributes_1.BullMQAttributes.WORKER_RATE_LIMIT_DURATION]: (_m = (_l = (_k = this.opts) === null || _k === void 0 ? void 0 : _k.limiter) === null || _l === void 0 ? void 0 : _l.duration) !== null && _m !== void 0 ? _m : 'none', | ||
// Limit by group keys was removed in bullmq 3.x | ||
[attributes_1.BullMQAttributes.WORKER_RATE_LIMIT_GROUP]: (_q = (_p = (_o = this.opts) === null || _o === void 0 ? void 0 : _o.limiter) === null || _p === void 0 ? void 0 : _p.groupKey) !== null && _q !== void 0 ? _q : 'none', | ||
@@ -254,0 +257,0 @@ }, |
{ | ||
"name": "@jenniferplusplus/opentelemetry-instrumentation-bullmq", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Auto-instrumentation for the BullMQ message framework", | ||
@@ -15,2 +15,3 @@ "main": "dist/index.js", | ||
"lint:fix": "eslint src/ test/ --ext .ts --fix", | ||
"prepare": "npm run compile", | ||
"test": "mocha --require ts-node/register --exit --timeout 10000 test/**/*.test.ts" | ||
@@ -27,12 +28,14 @@ }, | ||
"dependencies": { | ||
"@opentelemetry/api": "^1.1.0", | ||
"@opentelemetry/instrumentation": "^0.32.0", | ||
"@opentelemetry/semantic-conventions": "^1.6.0", | ||
"bullmq": "2.*", | ||
"@opentelemetry/api": "^1.3.0", | ||
"@opentelemetry/instrumentation": "^0.34.0", | ||
"@opentelemetry/semantic-conventions": "^1.8.0", | ||
"flat": "^5.0.2" | ||
}, | ||
"peerDependencies": { | ||
"bullmq": "^1.90.1 || ^2 || ^3" | ||
}, | ||
"devDependencies": { | ||
"@opentelemetry/context-async-hooks": "^1.6.0", | ||
"@opentelemetry/sdk-trace-base": "^1.6.0", | ||
"@opentelemetry/sdk-trace-node": "^1.6.0", | ||
"@opentelemetry/context-async-hooks": "^1.8.0", | ||
"@opentelemetry/sdk-trace-base": "^1.8.0", | ||
"@opentelemetry/sdk-trace-node": "^1.8.0", | ||
"@types/flat": "^5.0.2", | ||
@@ -46,2 +49,3 @@ "@types/ioredis": "^4.28.10", | ||
"@typescript-eslint/parser": "^5.35.1", | ||
"bullmq": "^3.5.1", | ||
"eslint": "^8.23.0", | ||
@@ -48,0 +52,0 @@ "ioredis-mock": "^8.2.2", |
# OpenTelemetry Bullmq Instrumentation for Node.js | ||
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/jenniferplusplus/opentelemetry-instrumentation-bullmq/Node.js%20CI) | ||
[![Node.js CI](https://github.com/jenniferplusplus/opentelemetry-instrumentation-bullmq/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/jenniferplusplus/opentelemetry-instrumentation-bullmq/actions/workflows/ci.yml) | ||
[![npm version](https://badge.fury.io/js/@jenniferplusplus%2Fopentelemetry-instrumentation-bullmq.svg)](https://badge.fury.io/js/@jenniferplusplus%2Fopentelemetry-instrumentation-bullmq) | ||
@@ -18,3 +18,3 @@ | ||
- `[1.90.1, 2.x]` | ||
- `[1.90.1, 2.x, 3.x]` | ||
@@ -25,3 +25,3 @@ It's likely that the instrumentation would support earlier versions of BullMQ, but I haven't tested it. | ||
OpenTelemetry Bullmq Instrumentation allows the user to automatically collect trace data from the controller handlers and export them to the backend of choice. | ||
OpenTelemetry Bullmq Instrumentation allows the user to automatically collect trace data from Bullmq jobs and workers and export them to the backend of choice. | ||
@@ -28,0 +28,0 @@ To load the instrumentation, specify it in the instrumentations list to `registerInstrumentations`. There is currently no configuration option. |
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
46283
474
21
+ Added@opentelemetry/instrumentation@0.34.0(transitive)
+ Addedbullmq@3.16.2(transitive)
- Removedbullmq@2.*
- Removed@opentelemetry/api-metrics@0.32.0(transitive)
- Removed@opentelemetry/instrumentation@0.32.0(transitive)
- Removedbullmq@2.4.0(transitive)
Updated@opentelemetry/api@^1.3.0