@opentelemetry/instrumentation-ioredis 0.34.2 → 0.34.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/index.js.map +1 -1
- package/build/src/instrumentation.js.map +1 -1
- package/build/src/internal-types.js.map +1 -1
- package/build/src/types.js.map +1 -1
- package/build/src/utils.js.map +1 -1
- package/build/src/version.d.ts +1 -1
- package/build/src/version.js +1 -1
- package/build/src/version.js.map +1 -1
- package/package.json +4 -4
package/build/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,oDAAkC;AAClC,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,oDAAkC;AAClC,0CAAwB","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './instrumentation';\nexport * from './types';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.js","sourceRoot":"","sources":["../../src/instrumentation.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAAoE;AACpE,oEAIwC;AAGxC,8EAG6C;AAC7C,oEAAwE;AACxE,mCAAkC;AAClC,8DAA2E;AAC3E,uCAAoC;AAEpC,MAAM,cAAc,GAAiC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gB,EAAE,CACxB,CAAC;gBACF,OAAO,aAAa,CAAC;YACvB,CAAC,EACD,aAAa,CAAC,EAAE;gBACd,IAAI,aAAa,KAAK,SAAS;oBAAE,OAAO;gBACxC,UAAI,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;gBACzC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;gBACrD,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;YACnD,CAAC,CACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,iBAAiB,CAAC,aAAsB;QAC9C,OAAO,CAAC,QAAkB,EAAE,EAAE;YAC5B,OAAO,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;QACxD,CAAC,CAAC;IACJ,CAAC;IAEO,gBAAgB;QACtB,OAAO,CAAC,QAAkB,EAAE,EAAE;YAC5B,OAAO,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QACxC,CAAC,CAAC;IACJ,CAAC;CA0HF;AAnLD,wDAmLC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag, trace, context, SpanKind } from '@opentelemetry/api';\nimport {\n InstrumentationBase,\n InstrumentationNodeModuleDefinition,\n isWrapped,\n} from '@opentelemetry/instrumentation';\nimport { IORedisInstrumentationConfig } from './types';\nimport { IORedisCommand, RedisInterface } from './internal-types';\nimport {\n DbSystemValues,\n SemanticAttributes,\n} from '@opentelemetry/semantic-conventions';\nimport { safeExecuteInTheMiddle } from '@opentelemetry/instrumentation';\nimport { endSpan } from './utils';\nimport { defaultDbStatementSerializer } from '@opentelemetry/redis-common';\nimport { VERSION } from './version';\n\nconst DEFAULT_CONFIG: IORedisInstrumentationConfig = {\n requireParentSpan: true,\n};\n\nexport class IORedisInstrumentation extends InstrumentationBase<any> {\n constructor(_config: IORedisInstrumentationConfig = {}) {\n super(\n '@opentelemetry/instrumentation-ioredis',\n VERSION,\n Object.assign({}, DEFAULT_CONFIG, _config)\n );\n }\n\n init(): InstrumentationNodeModuleDefinition<any>[] {\n return [\n new InstrumentationNodeModuleDefinition<any>(\n 'ioredis',\n ['>1', '<6'],\n (moduleExports, moduleVersion?: string) => {\n diag.debug('Applying patch for ioredis');\n if (isWrapped(moduleExports.prototype.sendCommand)) {\n this._unwrap(moduleExports.prototype, 'sendCommand');\n }\n this._wrap(\n moduleExports.prototype,\n 'sendCommand',\n this._patchSendCommand(moduleVersion)\n );\n if (isWrapped(moduleExports.prototype.connect)) {\n this._unwrap(moduleExports.prototype, 'connect');\n }\n this._wrap(\n moduleExports.prototype,\n 'connect',\n this._patchConnection()\n );\n return moduleExports;\n },\n moduleExports => {\n if (moduleExports === undefined) return;\n diag.debug('Removing patch for ioredis');\n this._unwrap(moduleExports.prototype, 'sendCommand');\n this._unwrap(moduleExports.prototype, 'connect');\n }\n ),\n ];\n }\n\n /**\n * Patch send command internal to trace requests\n */\n private _patchSendCommand(moduleVersion?: string) {\n return (original: Function) => {\n return this.traceSendCommand(original, moduleVersion);\n };\n }\n\n private _patchConnection() {\n return (original: Function) => {\n return this.traceConnection(original);\n };\n }\n\n private traceSendCommand = (original: Function, moduleVersion?: string) => {\n const instrumentation = this;\n return function (this: RedisInterface, cmd?: IORedisCommand) {\n if (arguments.length < 1 || typeof cmd !== 'object') {\n return original.apply(this, arguments);\n }\n const config =\n instrumentation.getConfig() as IORedisInstrumentationConfig;\n const dbStatementSerializer =\n config?.dbStatementSerializer || defaultDbStatementSerializer;\n\n const hasNoParentSpan = trace.getSpan(context.active()) === undefined;\n if (config?.requireParentSpan === true && hasNoParentSpan) {\n return original.apply(this, arguments);\n }\n\n const span = instrumentation.tracer.startSpan(cmd.name, {\n kind: SpanKind.CLIENT,\n attributes: {\n [SemanticAttributes.DB_SYSTEM]: DbSystemValues.REDIS,\n [SemanticAttributes.DB_STATEMENT]: dbStatementSerializer(\n cmd.name,\n cmd.args\n ),\n },\n });\n\n if (config?.requestHook) {\n safeExecuteInTheMiddle(\n () =>\n config?.requestHook!(span, {\n moduleVersion,\n cmdName: cmd.name,\n cmdArgs: cmd.args,\n }),\n e => {\n if (e) {\n diag.error('ioredis instrumentation: request hook failed', e);\n }\n },\n true\n );\n }\n\n const { host, port } = this.options;\n\n span.setAttributes({\n [SemanticAttributes.NET_PEER_NAME]: host,\n [SemanticAttributes.NET_PEER_PORT]: port,\n [SemanticAttributes.DB_CONNECTION_STRING]: `redis://${host}:${port}`,\n });\n\n try {\n const result = original.apply(this, arguments);\n\n const origResolve = cmd.resolve;\n /* eslint-disable @typescript-eslint/no-explicit-any */\n cmd.resolve = function (result: any) {\n safeExecuteInTheMiddle(\n () => config?.responseHook?.(span, cmd.name, cmd.args, result),\n e => {\n if (e) {\n diag.error('ioredis instrumentation: response hook failed', e);\n }\n },\n true\n );\n\n endSpan(span, null);\n origResolve(result);\n };\n\n const origReject = cmd.reject;\n cmd.reject = function (err: Error) {\n endSpan(span, err);\n origReject(err);\n };\n\n return result;\n } catch (error: any) {\n endSpan(span, error);\n throw error;\n }\n };\n };\n\n private traceConnection = (original: Function) => {\n const instrumentation = this;\n return function (this: RedisInterface) {\n const config =\n instrumentation.getConfig() as IORedisInstrumentationConfig;\n const hasNoParentSpan = trace.getSpan(context.active()) === undefined;\n if (config?.requireParentSpan === true && hasNoParentSpan) {\n return original.apply(this, arguments);\n }\n\n const span = instrumentation.tracer.startSpan('connect', {\n kind: SpanKind.CLIENT,\n attributes: {\n [SemanticAttributes.DB_SYSTEM]: DbSystemValues.REDIS,\n [SemanticAttributes.DB_STATEMENT]: 'connect',\n },\n });\n const { host, port } = this.options;\n\n span.setAttributes({\n [SemanticAttributes.NET_PEER_NAME]: host,\n [SemanticAttributes.NET_PEER_PORT]: port,\n [SemanticAttributes.DB_CONNECTION_STRING]: `redis://${host}:${port}`,\n });\n try {\n const client = original.apply(this, arguments);\n endSpan(span, null);\n return client;\n } catch (error: any) {\n endSpan(span, error);\n throw error;\n }\n };\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-types.js","sourceRoot":"","sources":["../../src/internal-types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"internal-types.js","sourceRoot":"","sources":["../../src/internal-types.ts"],"names":[],"mappings":"","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport type { Command, Redis } from 'ioredis';\nimport type * as LegacyIORedis from 'ioredis4';\n\ninterface LegacyIORedisCommand {\n reject: (err: Error) => void;\n resolve: (result: {}) => void;\n promise: Promise<{}>;\n args: Array<string | Buffer | number>;\n callback: LegacyIORedis.CallbackFunction<unknown>;\n name: string;\n}\n\nexport type IORedisCommand = Command | LegacyIORedisCommand;\nexport type RedisInterface = Redis | LegacyIORedis.Redis;\n"]}
|
package/build/src/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { InstrumentationConfig } from '@opentelemetry/instrumentation';\nimport { Span } from '@opentelemetry/api';\n\nexport type CommandArgs = Array<string | Buffer | number | any[]>;\n\n/**\n * Function that can be used to serialize db.statement tag\n * @param cmdName - The name of the command (eg. set, get, mset)\n * @param cmdArgs - Array of arguments passed to the command\n *\n * @returns serialized string that will be used as the db.statement attribute.\n */\nexport type DbStatementSerializer = (\n cmdName: string,\n cmdArgs: CommandArgs\n) => string;\n\nexport interface IORedisRequestHookInformation {\n moduleVersion?: string;\n cmdName: string;\n cmdArgs: CommandArgs;\n}\n\nexport interface RedisRequestCustomAttributeFunction {\n (span: Span, requestInfo: IORedisRequestHookInformation): void;\n}\n\n/**\n * Function that can be used to add custom attributes to span on response from redis server\n * @param span - The span created for the redis command, on which attributes can be set\n * @param cmdName - The name of the command (eg. set, get, mset)\n * @param cmdArgs - Array of arguments passed to the command\n * @param response - The response object which is returned to the user who called this command.\n * Can be used to set custom attributes on the span.\n * The type of the response varies depending on the specific command.\n */\nexport interface RedisResponseCustomAttributeFunction {\n (span: Span, cmdName: string, cmdArgs: CommandArgs, response: unknown): void;\n}\n\n/**\n * Options available for the IORedis Instrumentation (see [documentation](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-instrumentation-ioredis#ioredis-instrumentation-options))\n */\nexport interface IORedisInstrumentationConfig extends InstrumentationConfig {\n /** Custom serializer function for the db.statement tag */\n dbStatementSerializer?: DbStatementSerializer;\n\n /** Function for adding custom attributes on db request */\n requestHook?: RedisRequestCustomAttributeFunction;\n\n /** Function for adding custom attributes on db response */\n responseHook?: RedisResponseCustomAttributeFunction;\n\n /** Require parent to create ioredis span, default when unset is true */\n requireParentSpan?: boolean;\n}\n"]}
|
package/build/src/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAA0D;AAEnD,MAAM,OAAO,GAAG,CACrB,IAAU,EACV,GAA6C,EAC7C,EAAE;IACF,IAAI,GAAG,EAAE;QACP,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,SAAS,CAAC;YACb,IAAI,EAAE,oBAAc,CAAC,KAAK;YAC1B,OAAO,EAAE,GAAG,CAAC,OAAO;SACrB,CAAC,CAAC;KACJ;IACD,IAAI,CAAC,GAAG,EAAE,CAAC;AACb,CAAC,CAAC;AAZW,QAAA,OAAO,WAYlB"}
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAA0D;AAEnD,MAAM,OAAO,GAAG,CACrB,IAAU,EACV,GAA6C,EAC7C,EAAE;IACF,IAAI,GAAG,EAAE;QACP,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,SAAS,CAAC;YACb,IAAI,EAAE,oBAAc,CAAC,KAAK;YAC1B,OAAO,EAAE,GAAG,CAAC,OAAO;SACrB,CAAC,CAAC;KACJ;IACD,IAAI,CAAC,GAAG,EAAE,CAAC;AACb,CAAC,CAAC;AAZW,QAAA,OAAO,WAYlB","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Span, SpanStatusCode } from '@opentelemetry/api';\n\nexport const endSpan = (\n span: Span,\n err: NodeJS.ErrnoException | null | undefined\n) => {\n if (err) {\n span.recordException(err);\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: err.message,\n });\n }\n span.end();\n};\n"]}
|
package/build/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.34.
|
|
1
|
+
export declare const VERSION = "0.34.3";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/build/src/version.js
CHANGED
package/build/src/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.34.3';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentelemetry/instrumentation-ioredis",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.3",
|
|
4
4
|
"description": "OpenTelemetry ioredis automatic instrumentation package.",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"types": "build/src/index.d.ts",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@opentelemetry/api": "^1.3.0",
|
|
54
54
|
"@opentelemetry/context-async-hooks": "^1.8.0",
|
|
55
|
-
"@opentelemetry/contrib-test-utils": "^0.33.
|
|
55
|
+
"@opentelemetry/contrib-test-utils": "^0.33.4",
|
|
56
56
|
"@opentelemetry/sdk-trace-base": "^1.8.0",
|
|
57
57
|
"@opentelemetry/sdk-trace-node": "^1.8.0",
|
|
58
58
|
"@types/mocha": "7.0.2",
|
|
@@ -69,11 +69,11 @@
|
|
|
69
69
|
"typescript": "4.4.4"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@opentelemetry/instrumentation": "^0.
|
|
72
|
+
"@opentelemetry/instrumentation": "^0.40.0",
|
|
73
73
|
"@opentelemetry/redis-common": "^0.35.1",
|
|
74
74
|
"@opentelemetry/semantic-conventions": "^1.0.0",
|
|
75
75
|
"@types/ioredis4": "npm:@types/ioredis@^4.28.10"
|
|
76
76
|
},
|
|
77
77
|
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-ioredis#readme",
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "efdfc727a49090accee7fea8ff93011b6b84c1e4"
|
|
79
79
|
}
|