@opentelemetry/instrumentation-socket.io 0.52.0 → 0.52.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.
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The message destination name. This might be equal to the span name but is required nevertheless.
3
+ *
4
+ * @deprecated Use ATTR_MESSAGING_DESTINATION_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).
5
+ */
6
+ export declare const ATTR_MESSAGING_DESTINATION: "messaging.destination";
7
+ /**
8
+ * The kind of message destination.
9
+ *
10
+ * @deprecated Removed in semconv v1.20.0.
11
+ */
12
+ export declare const ATTR_MESSAGING_DESTINATION_KIND: "messaging.destination_kind";
13
+ /**
14
+ * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.
15
+ *
16
+ * @deprecated Use MESSAGING_OPERATION_TYPE_VALUE_RECEIVE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).
17
+ */
18
+ export declare const MESSAGING_OPERATION_VALUE_RECEIVE: "receive";
19
+ /**
20
+ * The kind of message destination.
21
+ *
22
+ * @deprecated Removed in semconv v1.20.0.
23
+ */
24
+ export declare const MESSAGING_DESTINATION_KIND_VALUE_TOPIC: "topic";
25
+ //# sourceMappingURL=semconv-obsolete.d.ts.map
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright The OpenTelemetry Authors
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.MESSAGING_DESTINATION_KIND_VALUE_TOPIC = exports.MESSAGING_OPERATION_VALUE_RECEIVE = exports.ATTR_MESSAGING_DESTINATION_KIND = exports.ATTR_MESSAGING_DESTINATION = void 0;
19
+ /*
20
+ * This file contains constants for values that where replaced/removed from
21
+ * Semantic Conventions long enough ago that they do not have `ATTR_*`
22
+ * constants in the `@opentelemetry/semantic-conventions` package. Eventually
23
+ * it is expected that this instrumention will be updated to emit telemetry
24
+ * using modern Semantic Conventions, dropping the need for the constants in
25
+ * this file.
26
+ */
27
+ /**
28
+ * The message destination name. This might be equal to the span name but is required nevertheless.
29
+ *
30
+ * @deprecated Use ATTR_MESSAGING_DESTINATION_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).
31
+ */
32
+ exports.ATTR_MESSAGING_DESTINATION = 'messaging.destination';
33
+ /**
34
+ * The kind of message destination.
35
+ *
36
+ * @deprecated Removed in semconv v1.20.0.
37
+ */
38
+ exports.ATTR_MESSAGING_DESTINATION_KIND = 'messaging.destination_kind';
39
+ /**
40
+ * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.
41
+ *
42
+ * @deprecated Use MESSAGING_OPERATION_TYPE_VALUE_RECEIVE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).
43
+ */
44
+ exports.MESSAGING_OPERATION_VALUE_RECEIVE = 'receive';
45
+ /**
46
+ * The kind of message destination.
47
+ *
48
+ * @deprecated Removed in semconv v1.20.0.
49
+ */
50
+ exports.MESSAGING_DESTINATION_KIND_VALUE_TOPIC = 'topic';
51
+ //# sourceMappingURL=semconv-obsolete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semconv-obsolete.js","sourceRoot":"","sources":["../../src/semconv-obsolete.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;;;;;;GAOG;AAEH;;;;GAIG;AACU,QAAA,0BAA0B,GAAG,uBAAgC,CAAC;AAE3E;;;;GAIG;AACU,QAAA,+BAA+B,GAC1C,4BAAqC,CAAC;AAExC;;;;GAIG;AACU,QAAA,iCAAiC,GAAG,SAAkB,CAAC;AAEpE;;;;GAIG;AACU,QAAA,sCAAsC,GAAG,OAAgB,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/*\n * This file contains constants for values that where replaced/removed from\n * Semantic Conventions long enough ago that they do not have `ATTR_*`\n * constants in the `@opentelemetry/semantic-conventions` package. Eventually\n * it is expected that this instrumention will be updated to emit telemetry\n * using modern Semantic Conventions, dropping the need for the constants in\n * this file.\n */\n\n/**\n * The message destination name. This might be equal to the span name but is required nevertheless.\n *\n * @deprecated Use ATTR_MESSAGING_DESTINATION_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const ATTR_MESSAGING_DESTINATION = 'messaging.destination' as const;\n\n/**\n * The kind of message destination.\n *\n * @deprecated Removed in semconv v1.20.0.\n */\nexport const ATTR_MESSAGING_DESTINATION_KIND =\n 'messaging.destination_kind' as const;\n\n/**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n *\n * @deprecated Use MESSAGING_OPERATION_TYPE_VALUE_RECEIVE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const MESSAGING_OPERATION_VALUE_RECEIVE = 'receive' as const;\n\n/**\n * The kind of message destination.\n *\n * @deprecated Removed in semconv v1.20.0.\n */\nexport const MESSAGING_DESTINATION_KIND_VALUE_TOPIC = 'topic' as const;\n"]}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Deprecated, use `messaging.operation.type` instead.
3
+ *
4
+ * @example publish
5
+ * @example create
6
+ * @example process
7
+ *
8
+ * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
9
+ *
10
+ * @deprecated Replaced by `messaging.operation.type`.
11
+ */
12
+ export declare const ATTR_MESSAGING_OPERATION: "messaging.operation";
13
+ /**
14
+ * The messaging system as identified by the client instrumentation.
15
+ *
16
+ * @note The actual messaging system may differ from the one known by the client. For example, when using Kafka client libraries to communicate with Azure Event Hubs, the `messaging.system` is set to `kafka` based on the instrumentation's best knowledge.
17
+ *
18
+ * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
19
+ */
20
+ export declare const ATTR_MESSAGING_SYSTEM: "messaging.system";
21
+ //# sourceMappingURL=semconv.d.ts.map
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright The OpenTelemetry Authors
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.ATTR_MESSAGING_SYSTEM = exports.ATTR_MESSAGING_OPERATION = void 0;
19
+ /*
20
+ * This file contains a copy of unstable semantic convention definitions
21
+ * used by this package.
22
+ * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv
23
+ */
24
+ /**
25
+ * Deprecated, use `messaging.operation.type` instead.
26
+ *
27
+ * @example publish
28
+ * @example create
29
+ * @example process
30
+ *
31
+ * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
32
+ *
33
+ * @deprecated Replaced by `messaging.operation.type`.
34
+ */
35
+ exports.ATTR_MESSAGING_OPERATION = 'messaging.operation';
36
+ /**
37
+ * The messaging system as identified by the client instrumentation.
38
+ *
39
+ * @note The actual messaging system may differ from the one known by the client. For example, when using Kafka client libraries to communicate with Azure Event Hubs, the `messaging.system` is set to `kafka` based on the instrumentation's best knowledge.
40
+ *
41
+ * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
42
+ */
43
+ exports.ATTR_MESSAGING_SYSTEM = 'messaging.system';
44
+ //# sourceMappingURL=semconv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semconv.js","sourceRoot":"","sources":["../../src/semconv.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;;;GAIG;AAEH;;;;;;;;;;GAUG;AACU,QAAA,wBAAwB,GAAG,qBAA8B,CAAC;AAEvE;;;;;;GAMG;AACU,QAAA,qBAAqB,GAAG,kBAA2B,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/*\n * This file contains a copy of unstable semantic convention definitions\n * used by this package.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n\n/**\n * Deprecated, use `messaging.operation.type` instead.\n *\n * @example publish\n * @example create\n * @example process\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `messaging.operation.type`.\n */\nexport const ATTR_MESSAGING_OPERATION = 'messaging.operation' as const;\n\n/**\n * The messaging system as identified by the client instrumentation.\n *\n * @note The actual messaging system may differ from the one known by the client. For example, when using Kafka client libraries to communicate with Azure Event Hubs, the `messaging.system` is set to `kafka` based on the instrumentation's best knowledge.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_MESSAGING_SYSTEM = 'messaging.system' as const;\n"]}
@@ -18,7 +18,8 @@ exports.SocketIoInstrumentation = void 0;
18
18
  */
19
19
  const api_1 = require("@opentelemetry/api");
20
20
  const instrumentation_1 = require("@opentelemetry/instrumentation");
21
- const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
21
+ const semconv_1 = require("./semconv");
22
+ const semconv_obsolete_1 = require("./semconv-obsolete");
22
23
  const AttributeNames_1 = require("./AttributeNames");
23
24
  /** @knipignore */
24
25
  const version_1 = require("./version");
@@ -197,12 +198,12 @@ class SocketIoInstrumentation extends instrumentation_1.InstrumentationBase {
197
198
  const wrappedListener = function (...args) {
198
199
  const eventName = ev;
199
200
  const namespace = this.name || this.adapter?.nsp?.name;
200
- const span = self.tracer.startSpan(`${semantic_conventions_1.MESSAGINGOPERATIONVALUES_RECEIVE} ${namespace}`, {
201
+ const span = self.tracer.startSpan(`${semconv_obsolete_1.MESSAGING_OPERATION_VALUE_RECEIVE} ${namespace}`, {
201
202
  kind: api_1.SpanKind.CONSUMER,
202
203
  attributes: {
203
- [semantic_conventions_1.SEMATTRS_MESSAGING_SYSTEM]: 'socket.io',
204
- [semantic_conventions_1.SEMATTRS_MESSAGING_DESTINATION]: namespace,
205
- [semantic_conventions_1.SEMATTRS_MESSAGING_OPERATION]: semantic_conventions_1.MESSAGINGOPERATIONVALUES_RECEIVE,
204
+ [semconv_1.ATTR_MESSAGING_SYSTEM]: 'socket.io',
205
+ [semconv_obsolete_1.ATTR_MESSAGING_DESTINATION]: namespace,
206
+ [semconv_1.ATTR_MESSAGING_OPERATION]: semconv_obsolete_1.MESSAGING_OPERATION_VALUE_RECEIVE,
206
207
  [AttributeNames_1.SocketIoInstrumentationAttributes.SOCKET_IO_EVENT_NAME]: eventName,
207
208
  },
208
209
  });
@@ -261,8 +262,8 @@ class SocketIoInstrumentation extends instrumentation_1.InstrumentationBase {
261
262
  const messagingSystem = 'socket.io';
262
263
  const eventName = ev;
263
264
  const attributes = {
264
- [semantic_conventions_1.SEMATTRS_MESSAGING_SYSTEM]: messagingSystem,
265
- [semantic_conventions_1.SEMATTRS_MESSAGING_DESTINATION_KIND]: semantic_conventions_1.MESSAGINGDESTINATIONKINDVALUES_TOPIC,
265
+ [semconv_1.ATTR_MESSAGING_SYSTEM]: messagingSystem,
266
+ [semconv_obsolete_1.ATTR_MESSAGING_DESTINATION_KIND]: semconv_obsolete_1.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,
266
267
  [AttributeNames_1.SocketIoInstrumentationAttributes.SOCKET_IO_EVENT_NAME]: eventName,
267
268
  };
268
269
  const rooms = (0, utils_1.extractRoomsAttributeValue)(this);
@@ -273,7 +274,7 @@ class SocketIoInstrumentation extends instrumentation_1.InstrumentationBase {
273
274
  if (namespace) {
274
275
  attributes[AttributeNames_1.SocketIoInstrumentationAttributes.SOCKET_IO_NAMESPACE] =
275
276
  namespace;
276
- attributes[semantic_conventions_1.SEMATTRS_MESSAGING_DESTINATION] = namespace;
277
+ attributes[semconv_obsolete_1.ATTR_MESSAGING_DESTINATION] = namespace;
277
278
  }
278
279
  const span = self.tracer.startSpan(`send ${namespace}`, {
279
280
  kind: api_1.SpanKind.PRODUCER,
@@ -1 +1 @@
1
- {"version":3,"file":"socket.io.js","sourceRoot":"","sources":["../../src/socket.io.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,4CAM4B;AAC5B,oEAMwC;AACxC,8EAO6C;AAE7C,qDAAqE;AACrE,kBAAkB;AAClB,uCAA0D;AAC1D,mCAIiB;AAEjB,MAAM,cAAc,GAAG;IACrB,SAAS;IACT,eAAe;IACf,YAAY;IACZ,eAAe;IACf,aAAa;IACb,gBAAgB;CACjB,CAAC;AAEF,MAAa,uBAAwB,SAAQ,qCAAkD;IAC7F,YAAY,SAAwC,EAAE;QACpD,KAAK,CAAC,sBAAY,EAAE,yBAAe,EAAE,IAAA,uBAAe,EAAC,MAAM,CAAC,CAAC,CAAC;IAChE,CAAC;IAES,IAAI;QACZ,MAAM,qBAAqB,GAAG,IAAI,+CAA6B,CAC7D,0BAA0B,EAC1B,CAAC,QAAQ,CAAC,EACV,CAAC,aAAa,EAAE,aAAa,EAAE,EAAE;YAC/B,IAAI,aAAa,KAAK,SAAS,IAAI,aAAa,KAAK,IAAI,EAAE;gBACzD,OAAO,aAAa,CAAC;aACtB;YACD,IAAI,aAAa,KAAK,SAAS,EAAE;gBAC/B,OAAO,aAAa,CAAC;aACtB;YACD,IAAI,IAAA,2BAAS,EAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,CAAC,EAAE;gBACnD,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;aACpD;YACD,IAAI,CAAC,KAAK,CACR,aAAa,CAAC,MAAM,CAAC,SAAS,EAC9B,IAAI,EACJ,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,CAC7B,CAAC;YACF,IAAI,IAAA,2BAAS,EAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE;gBACrD,IAAI,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CAAC;iBACb;wBAAS;oBACR,IAAI,CAAC,GAAG,EAAE,CAAC;iBACZ;YACH,CAAC,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;CACF;AA9WD,0DA8WC","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 {\n context,\n trace,\n Span,\n SpanKind,\n SpanStatusCode,\n} from '@opentelemetry/api';\nimport {\n InstrumentationBase,\n InstrumentationNodeModuleFile,\n InstrumentationNodeModuleDefinition,\n isWrapped,\n safeExecuteInTheMiddle,\n} from '@opentelemetry/instrumentation';\nimport {\n SEMATTRS_MESSAGING_DESTINATION,\n SEMATTRS_MESSAGING_DESTINATION_KIND,\n SEMATTRS_MESSAGING_OPERATION,\n SEMATTRS_MESSAGING_SYSTEM,\n MESSAGINGOPERATIONVALUES_RECEIVE,\n MESSAGINGDESTINATIONKINDVALUES_TOPIC,\n} from '@opentelemetry/semantic-conventions';\nimport { SocketIoInstrumentationConfig } from './types';\nimport { SocketIoInstrumentationAttributes } from './AttributeNames';\n/** @knipignore */\nimport { PACKAGE_NAME, PACKAGE_VERSION } from './version';\nimport {\n extractRoomsAttributeValue,\n isPromise,\n normalizeConfig,\n} from './utils';\n\nconst reservedEvents = [\n 'connect',\n 'connect_error',\n 'disconnect',\n 'disconnecting',\n 'newListener',\n 'removeListener',\n];\n\nexport class SocketIoInstrumentation extends InstrumentationBase<SocketIoInstrumentationConfig> {\n constructor(config: SocketIoInstrumentationConfig = {}) {\n super(PACKAGE_NAME, PACKAGE_VERSION, normalizeConfig(config));\n }\n\n protected init() {\n const socketInstrumentation = new InstrumentationNodeModuleFile(\n 'socket.io/dist/socket.js',\n ['>=3 <5'],\n (moduleExports, moduleVersion) => {\n if (moduleExports === undefined || moduleExports === null) {\n return moduleExports;\n }\n if (moduleVersion === undefined) {\n return moduleExports;\n }\n if (isWrapped(moduleExports?.Socket?.prototype?.on)) {\n this._unwrap(moduleExports.Socket.prototype, 'on');\n }\n this._wrap(\n moduleExports.Socket.prototype,\n 'on',\n this._patchOn(moduleVersion)\n );\n if (isWrapped(moduleExports?.Socket?.prototype?.emit)) {\n this._unwrap(moduleExports.Socket.prototype, 'emit');\n }\n this._wrap(\n moduleExports.Socket.prototype,\n 'emit',\n this._patchEmit(moduleVersion)\n );\n return moduleExports;\n },\n moduleExports => {\n if (isWrapped(moduleExports?.Socket?.prototype?.on)) {\n this._unwrap(moduleExports.Socket.prototype, 'on');\n }\n if (isWrapped(moduleExports?.Socket?.prototype?.emit)) {\n this._unwrap(moduleExports.Socket.prototype, 'emit');\n }\n return moduleExports;\n }\n );\n\n const broadcastOperatorInstrumentation = new InstrumentationNodeModuleFile(\n 'socket.io/dist/broadcast-operator.js',\n ['>=4 <5'],\n (moduleExports, moduleVersion) => {\n if (moduleExports === undefined || moduleExports === null) {\n return moduleExports;\n }\n if (moduleVersion === undefined) {\n return moduleExports;\n }\n if (isWrapped(moduleExports?.BroadcastOperator?.prototype?.emit)) {\n this._unwrap(moduleExports.BroadcastOperator.prototype, 'emit');\n }\n this._wrap(\n moduleExports.BroadcastOperator.prototype,\n 'emit',\n this._patchEmit(moduleVersion)\n );\n return moduleExports;\n },\n moduleExports => {\n if (isWrapped(moduleExports?.BroadcastOperator?.prototype?.emit)) {\n this._unwrap(moduleExports.BroadcastOperator.prototype, 'emit');\n }\n return moduleExports;\n }\n );\n const namespaceInstrumentation = new InstrumentationNodeModuleFile(\n 'socket.io/dist/namespace.js',\n ['<4'],\n (moduleExports, moduleVersion) => {\n if (moduleExports === undefined || moduleExports === null) {\n return moduleExports;\n }\n if (moduleVersion === undefined) {\n return moduleExports;\n }\n if (isWrapped(moduleExports?.Namespace?.prototype?.emit)) {\n this._unwrap(moduleExports.Namespace.prototype, 'emit');\n }\n this._wrap(\n moduleExports.Namespace.prototype,\n 'emit',\n this._patchEmit(moduleVersion)\n );\n return moduleExports;\n },\n moduleExports => {\n if (isWrapped(moduleExports?.Namespace?.prototype?.emit)) {\n this._unwrap(moduleExports.Namespace.prototype, 'emit');\n }\n }\n );\n const socketInstrumentationLegacy = new InstrumentationNodeModuleFile(\n 'socket.io/lib/socket.js',\n ['2'],\n (moduleExports, moduleVersion) => {\n if (moduleExports === undefined || moduleExports === null) {\n return moduleExports;\n }\n if (moduleVersion === undefined) {\n return moduleExports;\n }\n if (isWrapped(moduleExports.prototype?.on)) {\n this._unwrap(moduleExports.prototype, 'on');\n }\n this._wrap(moduleExports.prototype, 'on', this._patchOn(moduleVersion));\n if (isWrapped(moduleExports.prototype?.emit)) {\n this._unwrap(moduleExports.prototype, 'emit');\n }\n this._wrap(\n moduleExports.prototype,\n 'emit',\n this._patchEmit(moduleVersion)\n );\n return moduleExports;\n },\n moduleExports => {\n if (isWrapped(moduleExports.prototype?.on)) {\n this._unwrap(moduleExports.prototype, 'on');\n }\n if (isWrapped(moduleExports.prototype?.emit)) {\n this._unwrap(moduleExports.prototype, 'emit');\n }\n return moduleExports;\n }\n );\n const namespaceInstrumentationLegacy = new InstrumentationNodeModuleFile(\n 'socket.io/lib/namespace.js',\n ['2'],\n (moduleExports, moduleVersion) => {\n if (moduleExports === undefined || moduleExports === null) {\n return moduleExports;\n }\n if (moduleVersion === undefined) {\n return moduleExports;\n }\n if (isWrapped(moduleExports?.prototype?.emit)) {\n this._unwrap(moduleExports.prototype, 'emit');\n }\n this._wrap(\n moduleExports.prototype,\n 'emit',\n this._patchEmit(moduleVersion)\n );\n return moduleExports;\n },\n moduleExports => {\n if (isWrapped(moduleExports?.prototype?.emit)) {\n this._unwrap(moduleExports.prototype, 'emit');\n }\n }\n );\n\n return [\n new InstrumentationNodeModuleDefinition(\n 'socket.io',\n ['>=3 <5'],\n (moduleExports, moduleVersion) => {\n if (moduleExports === undefined || moduleExports === null) {\n return moduleExports;\n }\n if (moduleVersion === undefined) {\n return moduleExports;\n }\n if (isWrapped(moduleExports?.Server?.prototype?.on)) {\n this._unwrap(moduleExports.Server.prototype, 'on');\n }\n this._wrap(\n moduleExports.Server.prototype,\n 'on',\n this._patchOn(moduleVersion)\n );\n return moduleExports;\n },\n moduleExports => {\n if (isWrapped(moduleExports?.Server?.prototype?.on)) {\n this._unwrap(moduleExports.Server.prototype, 'on');\n }\n return moduleExports;\n },\n [\n broadcastOperatorInstrumentation,\n namespaceInstrumentation,\n socketInstrumentation,\n ]\n ),\n new InstrumentationNodeModuleDefinition(\n 'socket.io',\n ['2'],\n (moduleExports, moduleVersion) => {\n if (moduleExports === undefined || moduleExports === null) {\n return moduleExports;\n }\n if (moduleVersion === undefined) {\n return moduleExports;\n }\n if (isWrapped(moduleExports?.prototype?.on)) {\n this._unwrap(moduleExports.prototype, 'on');\n }\n this._wrap(\n moduleExports.prototype,\n 'on',\n this._patchOn(moduleVersion)\n );\n return moduleExports;\n },\n (moduleExports, moduleVersion) => {\n if (isWrapped(moduleExports?.prototype?.on)) {\n this._unwrap(moduleExports.prototype, 'on');\n }\n return moduleExports;\n },\n [namespaceInstrumentationLegacy, socketInstrumentationLegacy]\n ),\n ];\n }\n\n override setConfig(config: SocketIoInstrumentationConfig = {}) {\n return super.setConfig(normalizeConfig(config));\n }\n\n private _patchOn(moduleVersion: string) {\n const self = this;\n return (original: Function) => {\n return function (this: any, ev: any, originalListener: Function) {\n if (!self.getConfig().traceReserved && reservedEvents.includes(ev)) {\n return original.apply(this, arguments);\n }\n if (self.getConfig().onIgnoreEventList?.includes(ev)) {\n return original.apply(this, arguments);\n }\n const wrappedListener = function (this: any, ...args: any[]) {\n const eventName = ev;\n const namespace = this.name || this.adapter?.nsp?.name;\n const span: Span = self.tracer.startSpan(\n `${MESSAGINGOPERATIONVALUES_RECEIVE} ${namespace}`,\n {\n kind: SpanKind.CONSUMER,\n attributes: {\n [SEMATTRS_MESSAGING_SYSTEM]: 'socket.io',\n [SEMATTRS_MESSAGING_DESTINATION]: namespace,\n [SEMATTRS_MESSAGING_OPERATION]:\n MESSAGINGOPERATIONVALUES_RECEIVE,\n [SocketIoInstrumentationAttributes.SOCKET_IO_EVENT_NAME]:\n eventName,\n },\n }\n );\n\n const { onHook } = self.getConfig();\n if (onHook) {\n safeExecuteInTheMiddle(\n () => onHook(span, { moduleVersion, payload: args }),\n e => {\n if (e) self._diag.error('onHook error', e);\n },\n true\n );\n }\n return context.with(trace.setSpan(context.active(), span), () =>\n self.endSpan(() => originalListener.apply(this, arguments), span)\n );\n };\n return original.apply(this, [ev, wrappedListener]);\n };\n };\n }\n\n private endSpan(traced: () => any | Promise<any>, span: Span) {\n try {\n const result = traced();\n if (isPromise(result)) {\n return result.then(\n value => {\n span.end();\n return value;\n },\n err => {\n span.recordException(err);\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: err?.message,\n });\n span.end();\n throw err;\n }\n );\n } else {\n span.end();\n return result;\n }\n } catch (error: any) {\n span.recordException(error);\n span.setStatus({ code: SpanStatusCode.ERROR, message: error?.message });\n span.end();\n throw error;\n }\n }\n\n private _patchEmit(moduleVersion: string) {\n const self = this;\n return (original: Function) => {\n return function (this: any, ev: any, ...args: any[]) {\n if (!self.getConfig().traceReserved && reservedEvents.includes(ev)) {\n return original.apply(this, arguments);\n }\n if (self.getConfig().emitIgnoreEventList?.includes(ev)) {\n return original.apply(this, arguments);\n }\n const messagingSystem = 'socket.io';\n const eventName = ev;\n const attributes: any = {\n [SEMATTRS_MESSAGING_SYSTEM]: messagingSystem,\n [SEMATTRS_MESSAGING_DESTINATION_KIND]:\n MESSAGINGDESTINATIONKINDVALUES_TOPIC,\n [SocketIoInstrumentationAttributes.SOCKET_IO_EVENT_NAME]: eventName,\n };\n\n const rooms = extractRoomsAttributeValue(this);\n if (rooms.length) {\n attributes[SocketIoInstrumentationAttributes.SOCKET_IO_ROOMS] = rooms;\n }\n const namespace =\n this.name || this.adapter?.nsp?.name || this.sockets?.name;\n if (namespace) {\n attributes[SocketIoInstrumentationAttributes.SOCKET_IO_NAMESPACE] =\n namespace;\n attributes[SEMATTRS_MESSAGING_DESTINATION] = namespace;\n }\n const span = self.tracer.startSpan(`send ${namespace}`, {\n kind: SpanKind.PRODUCER,\n attributes,\n });\n\n const { emitHook } = self.getConfig();\n if (emitHook) {\n safeExecuteInTheMiddle(\n () => emitHook(span, { moduleVersion, payload: args }),\n e => {\n if (e) self._diag.error('emitHook error', e);\n },\n true\n );\n }\n try {\n return context.with(trace.setSpan(context.active(), span), () =>\n original.apply(this, arguments)\n );\n } catch (error: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error.message,\n });\n throw error;\n } finally {\n span.end();\n }\n };\n };\n }\n}\n"]}
1
+ {"version":3,"file":"socket.io.js","sourceRoot":"","sources":["../../src/socket.io.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,4CAM4B;AAC5B,oEAMwC;AACxC,uCAA4E;AAC5E,yDAK4B;AAE5B,qDAAqE;AACrE,kBAAkB;AAClB,uCAA0D;AAC1D,mCAIiB;AAEjB,MAAM,cAAc,GAAG;IACrB,SAAS;IACT,eAAe;IACf,YAAY;IACZ,eAAe;IACf,aAAa;IACb,gBAAgB;CACjB,CAAC;AAEF,MAAa,uBAAwB,SAAQ,qCAAkD;IAC7F,YAAY,SAAwC,EAAE;QACpD,KAAK,CAAC,sBAAY,EAAE,yBAAe,EAAE,IAAA,uBAAe,EAAC,MAAM,CAAC,CAAC,CAAC;IAChE,CAAC;IAES,IAAI;QACZ,MAAM,qBAAqB,GAAG,IAAI,+CAA6B,CAC7D,0BAA0B,EAC1B,CAAC,QAAQ,CAAC,EACV,CAAC,aAAa,EAAE,aAAa,EAAE,EAAE;YAC/B,IAAI,aAAa,KAAK,SAAS,IAAI,aAAa,KAAK,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ACF,IAAI,CAAC;4BAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC;oBAC/C,CAAC,EACD,IAAI,CACL,CAAC;iBACH;gBACD,IAAI;oBACF,OAAO,aAAO,CAAC,IAAI,CAAC,WAAK,CAAC,OAAO,CAAC,aAAO,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,CAC9D,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAChC,CAAC;iBACH;gBAAC,OAAO,KAAU,EAAE;oBACnB,IAAI,CAAC,SAAS,CAAC;wBACb,IAAI,EAAE,oBAAc,CAAC,KAAK;wBAC1B,OAAO,EAAE,KAAK,CAAC,OAAO;qBACvB,CAAC,CAAC;oBACH,MAAM,KAAK,CAAC;iBACb;wBAAS;oBACR,IAAI,CAAC,GAAG,EAAE,CAAC;iBACZ;YACH,CAAC,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;CACF;AA7WD,0DA6WC","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 {\n context,\n trace,\n Span,\n SpanKind,\n SpanStatusCode,\n} from '@opentelemetry/api';\nimport {\n InstrumentationBase,\n InstrumentationNodeModuleFile,\n InstrumentationNodeModuleDefinition,\n isWrapped,\n safeExecuteInTheMiddle,\n} from '@opentelemetry/instrumentation';\nimport { ATTR_MESSAGING_OPERATION, ATTR_MESSAGING_SYSTEM } from './semconv';\nimport {\n ATTR_MESSAGING_DESTINATION,\n ATTR_MESSAGING_DESTINATION_KIND,\n MESSAGING_OPERATION_VALUE_RECEIVE,\n MESSAGING_DESTINATION_KIND_VALUE_TOPIC,\n} from './semconv-obsolete';\nimport { SocketIoInstrumentationConfig } from './types';\nimport { SocketIoInstrumentationAttributes } from './AttributeNames';\n/** @knipignore */\nimport { PACKAGE_NAME, PACKAGE_VERSION } from './version';\nimport {\n extractRoomsAttributeValue,\n isPromise,\n normalizeConfig,\n} from './utils';\n\nconst reservedEvents = [\n 'connect',\n 'connect_error',\n 'disconnect',\n 'disconnecting',\n 'newListener',\n 'removeListener',\n];\n\nexport class SocketIoInstrumentation extends InstrumentationBase<SocketIoInstrumentationConfig> {\n constructor(config: SocketIoInstrumentationConfig = {}) {\n super(PACKAGE_NAME, PACKAGE_VERSION, normalizeConfig(config));\n }\n\n protected init() {\n const socketInstrumentation = new InstrumentationNodeModuleFile(\n 'socket.io/dist/socket.js',\n ['>=3 <5'],\n (moduleExports, moduleVersion) => {\n if (moduleExports === undefined || moduleExports === null) {\n return moduleExports;\n }\n if (moduleVersion === undefined) {\n return moduleExports;\n }\n if (isWrapped(moduleExports?.Socket?.prototype?.on)) {\n this._unwrap(moduleExports.Socket.prototype, 'on');\n }\n this._wrap(\n moduleExports.Socket.prototype,\n 'on',\n this._patchOn(moduleVersion)\n );\n if (isWrapped(moduleExports?.Socket?.prototype?.emit)) {\n this._unwrap(moduleExports.Socket.prototype, 'emit');\n }\n this._wrap(\n moduleExports.Socket.prototype,\n 'emit',\n this._patchEmit(moduleVersion)\n );\n return moduleExports;\n },\n moduleExports => {\n if (isWrapped(moduleExports?.Socket?.prototype?.on)) {\n this._unwrap(moduleExports.Socket.prototype, 'on');\n }\n if (isWrapped(moduleExports?.Socket?.prototype?.emit)) {\n this._unwrap(moduleExports.Socket.prototype, 'emit');\n }\n return moduleExports;\n }\n );\n\n const broadcastOperatorInstrumentation = new InstrumentationNodeModuleFile(\n 'socket.io/dist/broadcast-operator.js',\n ['>=4 <5'],\n (moduleExports, moduleVersion) => {\n if (moduleExports === undefined || moduleExports === null) {\n return moduleExports;\n }\n if (moduleVersion === undefined) {\n return moduleExports;\n }\n if (isWrapped(moduleExports?.BroadcastOperator?.prototype?.emit)) {\n this._unwrap(moduleExports.BroadcastOperator.prototype, 'emit');\n }\n this._wrap(\n moduleExports.BroadcastOperator.prototype,\n 'emit',\n this._patchEmit(moduleVersion)\n );\n return moduleExports;\n },\n moduleExports => {\n if (isWrapped(moduleExports?.BroadcastOperator?.prototype?.emit)) {\n this._unwrap(moduleExports.BroadcastOperator.prototype, 'emit');\n }\n return moduleExports;\n }\n );\n const namespaceInstrumentation = new InstrumentationNodeModuleFile(\n 'socket.io/dist/namespace.js',\n ['<4'],\n (moduleExports, moduleVersion) => {\n if (moduleExports === undefined || moduleExports === null) {\n return moduleExports;\n }\n if (moduleVersion === undefined) {\n return moduleExports;\n }\n if (isWrapped(moduleExports?.Namespace?.prototype?.emit)) {\n this._unwrap(moduleExports.Namespace.prototype, 'emit');\n }\n this._wrap(\n moduleExports.Namespace.prototype,\n 'emit',\n this._patchEmit(moduleVersion)\n );\n return moduleExports;\n },\n moduleExports => {\n if (isWrapped(moduleExports?.Namespace?.prototype?.emit)) {\n this._unwrap(moduleExports.Namespace.prototype, 'emit');\n }\n }\n );\n const socketInstrumentationLegacy = new InstrumentationNodeModuleFile(\n 'socket.io/lib/socket.js',\n ['2'],\n (moduleExports, moduleVersion) => {\n if (moduleExports === undefined || moduleExports === null) {\n return moduleExports;\n }\n if (moduleVersion === undefined) {\n return moduleExports;\n }\n if (isWrapped(moduleExports.prototype?.on)) {\n this._unwrap(moduleExports.prototype, 'on');\n }\n this._wrap(moduleExports.prototype, 'on', this._patchOn(moduleVersion));\n if (isWrapped(moduleExports.prototype?.emit)) {\n this._unwrap(moduleExports.prototype, 'emit');\n }\n this._wrap(\n moduleExports.prototype,\n 'emit',\n this._patchEmit(moduleVersion)\n );\n return moduleExports;\n },\n moduleExports => {\n if (isWrapped(moduleExports.prototype?.on)) {\n this._unwrap(moduleExports.prototype, 'on');\n }\n if (isWrapped(moduleExports.prototype?.emit)) {\n this._unwrap(moduleExports.prototype, 'emit');\n }\n return moduleExports;\n }\n );\n const namespaceInstrumentationLegacy = new InstrumentationNodeModuleFile(\n 'socket.io/lib/namespace.js',\n ['2'],\n (moduleExports, moduleVersion) => {\n if (moduleExports === undefined || moduleExports === null) {\n return moduleExports;\n }\n if (moduleVersion === undefined) {\n return moduleExports;\n }\n if (isWrapped(moduleExports?.prototype?.emit)) {\n this._unwrap(moduleExports.prototype, 'emit');\n }\n this._wrap(\n moduleExports.prototype,\n 'emit',\n this._patchEmit(moduleVersion)\n );\n return moduleExports;\n },\n moduleExports => {\n if (isWrapped(moduleExports?.prototype?.emit)) {\n this._unwrap(moduleExports.prototype, 'emit');\n }\n }\n );\n\n return [\n new InstrumentationNodeModuleDefinition(\n 'socket.io',\n ['>=3 <5'],\n (moduleExports, moduleVersion) => {\n if (moduleExports === undefined || moduleExports === null) {\n return moduleExports;\n }\n if (moduleVersion === undefined) {\n return moduleExports;\n }\n if (isWrapped(moduleExports?.Server?.prototype?.on)) {\n this._unwrap(moduleExports.Server.prototype, 'on');\n }\n this._wrap(\n moduleExports.Server.prototype,\n 'on',\n this._patchOn(moduleVersion)\n );\n return moduleExports;\n },\n moduleExports => {\n if (isWrapped(moduleExports?.Server?.prototype?.on)) {\n this._unwrap(moduleExports.Server.prototype, 'on');\n }\n return moduleExports;\n },\n [\n broadcastOperatorInstrumentation,\n namespaceInstrumentation,\n socketInstrumentation,\n ]\n ),\n new InstrumentationNodeModuleDefinition(\n 'socket.io',\n ['2'],\n (moduleExports, moduleVersion) => {\n if (moduleExports === undefined || moduleExports === null) {\n return moduleExports;\n }\n if (moduleVersion === undefined) {\n return moduleExports;\n }\n if (isWrapped(moduleExports?.prototype?.on)) {\n this._unwrap(moduleExports.prototype, 'on');\n }\n this._wrap(\n moduleExports.prototype,\n 'on',\n this._patchOn(moduleVersion)\n );\n return moduleExports;\n },\n (moduleExports, moduleVersion) => {\n if (isWrapped(moduleExports?.prototype?.on)) {\n this._unwrap(moduleExports.prototype, 'on');\n }\n return moduleExports;\n },\n [namespaceInstrumentationLegacy, socketInstrumentationLegacy]\n ),\n ];\n }\n\n override setConfig(config: SocketIoInstrumentationConfig = {}) {\n return super.setConfig(normalizeConfig(config));\n }\n\n private _patchOn(moduleVersion: string) {\n const self = this;\n return (original: Function) => {\n return function (this: any, ev: any, originalListener: Function) {\n if (!self.getConfig().traceReserved && reservedEvents.includes(ev)) {\n return original.apply(this, arguments);\n }\n if (self.getConfig().onIgnoreEventList?.includes(ev)) {\n return original.apply(this, arguments);\n }\n const wrappedListener = function (this: any, ...args: any[]) {\n const eventName = ev;\n const namespace = this.name || this.adapter?.nsp?.name;\n const span: Span = self.tracer.startSpan(\n `${MESSAGING_OPERATION_VALUE_RECEIVE} ${namespace}`,\n {\n kind: SpanKind.CONSUMER,\n attributes: {\n [ATTR_MESSAGING_SYSTEM]: 'socket.io',\n [ATTR_MESSAGING_DESTINATION]: namespace,\n [ATTR_MESSAGING_OPERATION]: MESSAGING_OPERATION_VALUE_RECEIVE,\n [SocketIoInstrumentationAttributes.SOCKET_IO_EVENT_NAME]:\n eventName,\n },\n }\n );\n\n const { onHook } = self.getConfig();\n if (onHook) {\n safeExecuteInTheMiddle(\n () => onHook(span, { moduleVersion, payload: args }),\n e => {\n if (e) self._diag.error('onHook error', e);\n },\n true\n );\n }\n return context.with(trace.setSpan(context.active(), span), () =>\n self.endSpan(() => originalListener.apply(this, arguments), span)\n );\n };\n return original.apply(this, [ev, wrappedListener]);\n };\n };\n }\n\n private endSpan(traced: () => any | Promise<any>, span: Span) {\n try {\n const result = traced();\n if (isPromise(result)) {\n return result.then(\n value => {\n span.end();\n return value;\n },\n err => {\n span.recordException(err);\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: err?.message,\n });\n span.end();\n throw err;\n }\n );\n } else {\n span.end();\n return result;\n }\n } catch (error: any) {\n span.recordException(error);\n span.setStatus({ code: SpanStatusCode.ERROR, message: error?.message });\n span.end();\n throw error;\n }\n }\n\n private _patchEmit(moduleVersion: string) {\n const self = this;\n return (original: Function) => {\n return function (this: any, ev: any, ...args: any[]) {\n if (!self.getConfig().traceReserved && reservedEvents.includes(ev)) {\n return original.apply(this, arguments);\n }\n if (self.getConfig().emitIgnoreEventList?.includes(ev)) {\n return original.apply(this, arguments);\n }\n const messagingSystem = 'socket.io';\n const eventName = ev;\n const attributes: any = {\n [ATTR_MESSAGING_SYSTEM]: messagingSystem,\n [ATTR_MESSAGING_DESTINATION_KIND]:\n MESSAGING_DESTINATION_KIND_VALUE_TOPIC,\n [SocketIoInstrumentationAttributes.SOCKET_IO_EVENT_NAME]: eventName,\n };\n\n const rooms = extractRoomsAttributeValue(this);\n if (rooms.length) {\n attributes[SocketIoInstrumentationAttributes.SOCKET_IO_ROOMS] = rooms;\n }\n const namespace =\n this.name || this.adapter?.nsp?.name || this.sockets?.name;\n if (namespace) {\n attributes[SocketIoInstrumentationAttributes.SOCKET_IO_NAMESPACE] =\n namespace;\n attributes[ATTR_MESSAGING_DESTINATION] = namespace;\n }\n const span = self.tracer.startSpan(`send ${namespace}`, {\n kind: SpanKind.PRODUCER,\n attributes,\n });\n\n const { emitHook } = self.getConfig();\n if (emitHook) {\n safeExecuteInTheMiddle(\n () => emitHook(span, { moduleVersion, payload: args }),\n e => {\n if (e) self._diag.error('emitHook error', e);\n },\n true\n );\n }\n try {\n return context.with(trace.setSpan(context.active(), span), () =>\n original.apply(this, arguments)\n );\n } catch (error: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error.message,\n });\n throw error;\n } finally {\n span.end();\n }\n };\n };\n }\n}\n"]}
@@ -1,3 +1,3 @@
1
- export declare const PACKAGE_VERSION = "0.52.0";
1
+ export declare const PACKAGE_VERSION = "0.52.3";
2
2
  export declare const PACKAGE_NAME = "@opentelemetry/instrumentation-socket.io";
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.52.0';
20
+ exports.PACKAGE_VERSION = '0.52.3';
21
21
  exports.PACKAGE_NAME = '@opentelemetry/instrumentation-socket.io';
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,0CAA0C,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-socket.io';\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,0CAA0C,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.3';\nexport const PACKAGE_NAME = '@opentelemetry/instrumentation-socket.io';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentelemetry/instrumentation-socket.io",
3
- "version": "0.52.0",
3
+ "version": "0.52.3",
4
4
  "description": "OpenTelemetry instrumentation for `socket.io` messaging server implementation for Socket.IO communication",
5
5
  "main": "build/src/index.js",
6
6
  "types": "build/src/index.d.ts",
@@ -20,7 +20,6 @@
20
20
  "tdd": "npm run test -- --watch-extensions ts --watch",
21
21
  "test": "nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' 'test/**/*.test.ts'",
22
22
  "test-all-versions": "tav",
23
- "test-merge-coverage": "nyc merge .nyc_output coverage/coverage-final.json",
24
23
  "version:update": "node ../../scripts/version-update.js"
25
24
  },
26
25
  "keywords": [
@@ -48,7 +47,7 @@
48
47
  },
49
48
  "devDependencies": {
50
49
  "@opentelemetry/api": "^1.3.0",
51
- "@opentelemetry/contrib-test-utils": "^0.51.0",
50
+ "@opentelemetry/contrib-test-utils": "^0.52.2",
52
51
  "@opentelemetry/sdk-trace-base": "^2.0.0",
53
52
  "@types/mocha": "10.0.10",
54
53
  "@types/node": "18.18.14",
@@ -61,9 +60,8 @@
61
60
  "typescript": "5.0.4"
62
61
  },
63
62
  "dependencies": {
64
- "@opentelemetry/instrumentation": "^0.205.0",
65
- "@opentelemetry/semantic-conventions": "^1.27.0"
63
+ "@opentelemetry/instrumentation": "^0.205.0"
66
64
  },
67
65
  "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-socket.io#readme",
68
- "gitHead": "f54a1ba1adf19fd2cbf9ddbdb32a3baca2ed328e"
66
+ "gitHead": "5a5918fd4f9f16b14c9ef4d3de08ab98c20e5b46"
69
67
  }