@opentelemetry/instrumentation-ioredis 0.50.1 → 0.52.0

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.
@@ -31,7 +31,7 @@ export interface RedisResponseCustomAttributeFunction {
31
31
  (span: Span, cmdName: string, cmdArgs: CommandArgs, response: unknown): void;
32
32
  }
33
33
  /**
34
- * Options available for the IORedis Instrumentation (see [documentation](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/plugins/node/opentelemetry-instrumentation-ioredis/README.md#ioredis-instrumentation-options))
34
+ * Options available for the IORedis Instrumentation (see [documentation](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/packages/instrumentation-ioredis/README.md#ioredis-instrumentation-options))
35
35
  */
36
36
  export interface IORedisInstrumentationConfig extends InstrumentationConfig {
37
37
  /** Custom serializer function for the db.statement tag */
@@ -1 +1 @@
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-contrib/blob/main/plugins/node/opentelemetry-instrumentation-ioredis/README.md#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"]}
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-contrib/blob/main/packages/instrumentation-ioredis/README.md#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"]}
@@ -1,3 +1,3 @@
1
- export declare const PACKAGE_VERSION = "0.50.1";
1
+ export declare const PACKAGE_VERSION = "0.52.0";
2
2
  export declare const PACKAGE_NAME = "@opentelemetry/instrumentation-ioredis";
3
3
  //# sourceMappingURL=version.d.ts.map
@@ -17,6 +17,6 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.PACKAGE_NAME = exports.PACKAGE_VERSION = void 0;
19
19
  // this is autogenerated file, see scripts/version-update.js
20
- exports.PACKAGE_VERSION = '0.50.1';
20
+ exports.PACKAGE_VERSION = '0.52.0';
21
21
  exports.PACKAGE_NAME = '@opentelemetry/instrumentation-ioredis';
22
22
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,eAAe,GAAG,QAAQ,CAAC;AAC3B,QAAA,YAAY,GAAG,wCAAwC,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 PACKAGE_VERSION = '0.50.1';\nexport const PACKAGE_NAME = '@opentelemetry/instrumentation-ioredis';\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,eAAe,GAAG,QAAQ,CAAC;AAC3B,QAAA,YAAY,GAAG,wCAAwC,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 PACKAGE_VERSION = '0.52.0';\nexport const PACKAGE_NAME = '@opentelemetry/instrumentation-ioredis';\n"]}
package/package.json CHANGED
@@ -1,25 +1,32 @@
1
1
  {
2
2
  "name": "@opentelemetry/instrumentation-ioredis",
3
- "version": "0.50.1",
3
+ "version": "0.52.0",
4
4
  "description": "OpenTelemetry instrumentation for `ioredis` database redis client for Redis",
5
5
  "main": "build/src/index.js",
6
6
  "types": "build/src/index.d.ts",
7
- "repository": "open-telemetry/opentelemetry-js-contrib",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/open-telemetry/opentelemetry-js-contrib.git",
10
+ "directory": "packages/instrumentation-ioredis"
11
+ },
8
12
  "scripts": {
9
- "test": "nyc mocha 'test/**/*.test.ts'",
10
- "test:debug": "cross-env RUN_REDIS_TESTS_LOCAL=true mocha --inspect-brk --no-timeouts 'test/**/*.test.ts'",
11
- "test:local": "cross-env RUN_REDIS_TESTS_LOCAL=true npm run test",
12
- "test-all-versions": "tav",
13
- "test-all-versions:local": "cross-env RUN_REDIS_TESTS_LOCAL=true npm run test-all-versions",
14
- "tdd": "npm run test -- --watch-extensions ts --watch",
15
13
  "clean": "rimraf build/*",
16
- "lint": "eslint . --ext .ts",
17
- "lint:fix": "eslint . --ext .ts --fix",
18
- "lint:readme": "node ../../../scripts/lint-readme.js",
19
- "version:update": "node ../../../scripts/version-update.js",
20
- "setup:dev": "nx run-many -t compile -p @opentelemetry/instrumentation-ioredis",
21
14
  "compile": "tsc -p .",
22
- "prepublishOnly": "npm run compile"
15
+ "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-ioredis",
16
+ "lint": "eslint . --ext=ts,js,mjs",
17
+ "lint:fix": "eslint . --ext=ts,js,mjs --fix",
18
+ "lint:readme": "node ../../scripts/lint-readme.js",
19
+ "prepublishOnly": "npm run compile",
20
+ "test": "nyc --no-clean mocha 'test/**/*.test.ts'",
21
+ "test-all-versions": "tav",
22
+ "test-merge-coverage": "nyc merge .nyc_output coverage/coverage-final.json",
23
+ "tdd": "npm run test -- --watch-extensions ts --watch",
24
+ "test:debug": "cross-env RUN_REDIS_TESTS=true mocha --inspect-brk --no-timeouts 'test/**/*.test.ts'",
25
+ "test:with-services-env": "cross-env NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=../../test/test-services.env npm test",
26
+ "test-all-versions:with-services-env": "cross-env NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=../../test/test-services.env npm run test-all-versions",
27
+ "test-services:start": "cd ../.. && npm run test-services:start redis",
28
+ "test-services:stop": "cd ../.. && npm run test-services:stop redis",
29
+ "version:update": "node ../../scripts/version-update.js"
23
30
  },
24
31
  "keywords": [
25
32
  "instrumentation",
@@ -49,7 +56,7 @@
49
56
  "devDependencies": {
50
57
  "@opentelemetry/api": "^1.3.0",
51
58
  "@opentelemetry/context-async-hooks": "^2.0.0",
52
- "@opentelemetry/contrib-test-utils": "^0.48.0",
59
+ "@opentelemetry/contrib-test-utils": "^0.50.0",
53
60
  "@opentelemetry/sdk-trace-base": "^2.0.0",
54
61
  "@opentelemetry/sdk-trace-node": "^2.0.0",
55
62
  "@types/ioredis4": "npm:@types/ioredis@4.28.10",
@@ -65,10 +72,10 @@
65
72
  "typescript": "5.0.4"
66
73
  },
67
74
  "dependencies": {
68
- "@opentelemetry/instrumentation": "^0.202.0",
75
+ "@opentelemetry/instrumentation": "^0.204.0",
69
76
  "@opentelemetry/redis-common": "^0.38.0",
70
77
  "@opentelemetry/semantic-conventions": "^1.27.0"
71
78
  },
72
- "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-ioredis#readme",
73
- "gitHead": "52dd28deae0ebfbec43bdaed82f4749fc9803797"
79
+ "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-ioredis#readme",
80
+ "gitHead": "0a45ac1b951d2acd2e40834e7ae012c04820faec"
74
81
  }