@opentelemetry/otlp-grpc-exporter-base 0.41.2 → 0.43.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.
@@ -1 +1 @@
1
- {"version":3,"file":"OTLPGRPCExporterNodeBase.js","sourceRoot":"","sources":["../../src/OTLPGRPCExporterNodeBase.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAA0C;AAC1C,2CAAyC;AAOzC,8CAA2D;AAC3D,iCAAwE;AACxE,0EAG2C;AAE3C;;GAEG;AACH,MAAsB,wBAGpB,SAAQ,qCAIT;IAOC,YAAY,SAAqC,EAAE;QACjD,KAAK,CAAC,MAAM,CAAC,CAAC;QAPhB,cAAS,GAAgC,EAAE,CAAC;QAE5C,kBAAa,GAAmB,SAAS,CAAC;QAMxC,IAAI,MAAM,CAAC,OAAO,EAAE;YAClB,UAAI,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;SACpD;QACD,MAAM,OAAO,GAAG,mBAAY,CAAC,uBAAuB,CAClD,IAAA,aAAM,GAAE,CAAC,0BAA0B,CACpC,CAAC;QACF,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAI,IAAI,kBAAQ,EAAE,CAAC;QAClD,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;YAC5C,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SACzB;QACD,IAAI,CAAC,WAAW,GAAG,IAAA,2BAAoB,EAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAC9D,CAAC;IAEO,YAAY,CAClB,OAAqB,EACrB,SAAqB,EACrB,OAA2C;QAE3C,MAAM,OAAO,GAAG,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACpD,IAAI,CAAC,KAAK,CAAC,IAAI,EAA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Y,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;SAChD;IACH,CAAC;IAED,UAAU;QACR,IAAI,IAAI,CAAC,aAAa,EAAE;YACtB,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;SAC5B;IACH,CAAC;CAKF;AAzFD,4DAyFC","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 } from '@opentelemetry/api';\nimport { Metadata } from '@grpc/grpc-js';\nimport {\n OTLPGRPCExporterConfigNode,\n GRPCQueueItem,\n ServiceClientType,\n} from './types';\nimport { ServiceClient } from './types';\nimport { getEnv, baggageUtils } from '@opentelemetry/core';\nimport { configureCompression, GrpcCompressionAlgorithm } from './util';\nimport {\n OTLPExporterBase,\n OTLPExporterError,\n} from '@opentelemetry/otlp-exporter-base';\n\n/**\n * OTLP Exporter abstract base class\n */\nexport abstract class OTLPGRPCExporterNodeBase<\n ExportItem,\n ServiceRequest\n> extends OTLPExporterBase<\n OTLPGRPCExporterConfigNode,\n ExportItem,\n ServiceRequest\n> {\n grpcQueue: GRPCQueueItem<ExportItem>[] = [];\n metadata?: Metadata;\n serviceClient?: ServiceClient = undefined;\n private _send!: Function;\n compression: GrpcCompressionAlgorithm;\n\n constructor(config: OTLPGRPCExporterConfigNode = {}) {\n super(config);\n if (config.headers) {\n diag.warn('Headers cannot be set when using grpc');\n }\n const headers = baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_HEADERS\n );\n this.metadata = config.metadata || new Metadata();\n for (const [k, v] of Object.entries(headers)) {\n this.metadata.set(k, v);\n }\n this.compression = configureCompression(config.compression);\n }\n\n private _sendPromise(\n objects: ExportItem[],\n onSuccess: () => void,\n onError: (error: OTLPExporterError) => void\n ): void {\n const promise = new Promise<void>((resolve, reject) => {\n this._send(this, objects, resolve, reject);\n }).then(onSuccess, onError);\n\n this._sendingPromises.push(promise);\n const popPromise = () => {\n const index = this._sendingPromises.indexOf(promise);\n this._sendingPromises.splice(index, 1);\n };\n promise.then(popPromise, popPromise);\n }\n\n onInit(config: OTLPGRPCExporterConfigNode): void {\n // defer to next tick and lazy load to avoid loading grpc too early\n // and making this impossible to be instrumented\n setImmediate(() => {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { onInit } = require('./util');\n onInit(this, config);\n });\n }\n\n send(\n objects: ExportItem[],\n onSuccess: () => void,\n onError: (error: OTLPExporterError) => void\n ): void {\n if (this._shutdownOnce.isCalled) {\n diag.debug('Shutdown already started. Cannot send objects');\n return;\n }\n if (!this._send) {\n // defer to next tick and lazy load to avoid loading grpc too early\n // and making this impossible to be instrumented\n setImmediate(() => {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { send } = require('./util');\n this._send = send;\n\n this._sendPromise(objects, onSuccess, onError);\n });\n } else {\n this._sendPromise(objects, onSuccess, onError);\n }\n }\n\n onShutdown(): void {\n if (this.serviceClient) {\n this.serviceClient.close();\n }\n }\n\n abstract getServiceProtoPath(): string;\n abstract getServiceClientType(): ServiceClientType;\n abstract getUrlFromConfig(config: OTLPGRPCExporterConfigNode): string;\n}\n"]}
1
+ {"version":3,"file":"OTLPGRPCExporterNodeBase.js","sourceRoot":"","sources":["../../src/OTLPGRPCExporterNodeBase.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAA0C;AAC1C,2CAAyC;AAOzC,8CAA2D;AAC3D,iCAAwE;AACxE,0EAG2C;AAE3C;;GAEG;AACH,MAAsB,wBAGpB,SAAQ,qCAIT;IAOC,YAAY,SAAqC,EAAE;Q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EAAE,UAAU,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,MAAkC;QACvC,mEAAmE;QACnE,gDAAgD;QAChD,YAAY,CAAC,GAAG,EAAE;YAChB,8DAA8D;YAC9D,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;YACrC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAI,CACF,OAAqB,EACrB,SAAqB,EACrB,OAA2C;QAE3C,IAAI,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE;YAC/B,UAAI,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAC;YAC5D,OAAO;SACR;QACD,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACf,mEAAmE;YACnE,gDAAgD;YAChD,YAAY,CAAC,GAAG,EAAE;gBAChB,8DAA8D;gBAC9D,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;gBACnC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;gBAElB,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;YACjD,CAAC,CAAC,CAAC;SACJ;aAAM;YACL,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;SAChD;IACH,CAAC;IAED,UAAU;QACR,IAAI,IAAI,CAAC,aAAa,EAAE;YACtB,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;SAC5B;IACH,CAAC;CAKF;AAzFD,4DAyFC","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 } from '@opentelemetry/api';\nimport { Metadata } from '@grpc/grpc-js';\nimport {\n OTLPGRPCExporterConfigNode,\n GRPCQueueItem,\n ServiceClientType,\n} from './types';\nimport { ServiceClient } from './types';\nimport { getEnv, baggageUtils } from '@opentelemetry/core';\nimport { configureCompression, GrpcCompressionAlgorithm } from './util';\nimport {\n OTLPExporterBase,\n OTLPExporterError,\n} from '@opentelemetry/otlp-exporter-base';\n\n/**\n * OTLP Exporter abstract base class\n */\nexport abstract class OTLPGRPCExporterNodeBase<\n ExportItem,\n ServiceRequest,\n> extends OTLPExporterBase<\n OTLPGRPCExporterConfigNode,\n ExportItem,\n ServiceRequest\n> {\n grpcQueue: GRPCQueueItem<ExportItem>[] = [];\n metadata?: Metadata;\n serviceClient?: ServiceClient = undefined;\n private _send!: Function;\n compression: GrpcCompressionAlgorithm;\n\n constructor(config: OTLPGRPCExporterConfigNode = {}) {\n super(config);\n if (config.headers) {\n diag.warn('Headers cannot be set when using grpc');\n }\n const headers = baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_HEADERS\n );\n this.metadata = config.metadata || new Metadata();\n for (const [k, v] of Object.entries(headers)) {\n this.metadata.set(k, v);\n }\n this.compression = configureCompression(config.compression);\n }\n\n private _sendPromise(\n objects: ExportItem[],\n onSuccess: () => void,\n onError: (error: OTLPExporterError) => void\n ): void {\n const promise = new Promise<void>((resolve, reject) => {\n this._send(this, objects, resolve, reject);\n }).then(onSuccess, onError);\n\n this._sendingPromises.push(promise);\n const popPromise = () => {\n const index = this._sendingPromises.indexOf(promise);\n this._sendingPromises.splice(index, 1);\n };\n promise.then(popPromise, popPromise);\n }\n\n onInit(config: OTLPGRPCExporterConfigNode): void {\n // defer to next tick and lazy load to avoid loading grpc too early\n // and making this impossible to be instrumented\n setImmediate(() => {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { onInit } = require('./util');\n onInit(this, config);\n });\n }\n\n send(\n objects: ExportItem[],\n onSuccess: () => void,\n onError: (error: OTLPExporterError) => void\n ): void {\n if (this._shutdownOnce.isCalled) {\n diag.debug('Shutdown already started. Cannot send objects');\n return;\n }\n if (!this._send) {\n // defer to next tick and lazy load to avoid loading grpc too early\n // and making this impossible to be instrumented\n setImmediate(() => {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { send } = require('./util');\n this._send = send;\n\n this._sendPromise(objects, onSuccess, onError);\n });\n } else {\n this._sendPromise(objects, onSuccess, onError);\n }\n }\n\n onShutdown(): void {\n if (this.serviceClient) {\n this.serviceClient.close();\n }\n }\n\n abstract getServiceProtoPath(): string;\n abstract getServiceClientType(): ServiceClientType;\n abstract getUrlFromConfig(config: OTLPGRPCExporterConfigNode): string;\n}\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.41.2";
1
+ export declare const VERSION = "0.43.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -17,5 +17,5 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.VERSION = void 0;
19
19
  // this is autogenerated file, see scripts/version-update.js
20
- exports.VERSION = '0.41.2';
20
+ exports.VERSION = '0.43.0';
21
21
  //# 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,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.41.2';\n"]}
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.43.0';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentelemetry/otlp-grpc-exporter-base",
3
- "version": "0.41.2",
3
+ "version": "0.43.0",
4
4
  "description": "OpenTelemetry OTLP-gRPC Exporter base (for internal use only)",
5
5
  "main": "build/src/index.js",
6
6
  "types": "build/src/index.d.ts",
@@ -48,21 +48,21 @@
48
48
  "access": "public"
49
49
  },
50
50
  "devDependencies": {
51
- "@babel/core": "7.22.10",
52
- "@opentelemetry/api": "1.4.1",
53
- "@opentelemetry/otlp-transformer": "0.41.2",
54
- "@opentelemetry/resources": "1.15.2",
55
- "@opentelemetry/sdk-trace-base": "1.15.2",
51
+ "@babel/core": "7.22.17",
52
+ "@opentelemetry/api": "1.6.0",
53
+ "@opentelemetry/otlp-transformer": "0.43.0",
54
+ "@opentelemetry/resources": "1.17.0",
55
+ "@opentelemetry/sdk-trace-base": "1.17.0",
56
56
  "@types/mocha": "10.0.1",
57
57
  "@types/node": "18.6.5",
58
58
  "@types/sinon": "10.0.16",
59
59
  "codecov": "3.8.3",
60
60
  "cpx": "1.5.0",
61
61
  "cross-var": "1.1.0",
62
- "lerna": "7.1.4",
62
+ "lerna": "7.1.5",
63
63
  "mocha": "10.2.0",
64
64
  "nyc": "15.1.0",
65
- "protobufjs-cli": "1.1.1",
65
+ "protobufjs-cli": "1.1.2",
66
66
  "sinon": "15.1.2",
67
67
  "ts-loader": "8.4.0",
68
68
  "ts-mocha": "10.0.0",
@@ -73,11 +73,11 @@
73
73
  },
74
74
  "dependencies": {
75
75
  "@grpc/grpc-js": "^1.7.1",
76
- "@opentelemetry/core": "1.15.2",
77
- "@opentelemetry/otlp-exporter-base": "0.41.2",
76
+ "@opentelemetry/core": "1.17.0",
77
+ "@opentelemetry/otlp-exporter-base": "0.43.0",
78
78
  "protobufjs": "^7.2.3"
79
79
  },
80
80
  "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/otlp-grpc-exporter-base",
81
81
  "sideEffects": false,
82
- "gitHead": "48fb15862e801b742059a3e39dbcc8ef4c10b2e2"
82
+ "gitHead": "faf939c77591f709afbc23fadbe629c9d3607ef6"
83
83
  }