fix(deps): use 1.x trace otlp http exporter (#2788)
Co-authored-by: Gerhard Stöbich <deb2001-github@yahoo.de>
This commit is contained in:
parent
b8df001379
commit
def9ba3ea5
|
|
@ -69,7 +69,7 @@
|
|||
"@grpc/grpc-js": "^1.3.7",
|
||||
"@grpc/proto-loader": "^0.6.4",
|
||||
"@opentelemetry/core": "1.0.1",
|
||||
"@opentelemetry/exporter-trace-otlp-http": "0.27.0",
|
||||
"@opentelemetry/exporter-trace-otlp-http": "1.0.1",
|
||||
"@opentelemetry/resources": "1.0.1",
|
||||
"@opentelemetry/sdk-trace-base": "1.0.1"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ export abstract class OTLPExporterNodeBase<
|
|||
}
|
||||
|
||||
onInit(config: OTLPExporterConfigNode): void {
|
||||
this._isShutdown = false;
|
||||
// defer to next tick and lazy load to avoid loading grpc too early
|
||||
// and making this impossible to be instrumented
|
||||
setImmediate(() => {
|
||||
|
|
@ -90,7 +89,7 @@ export abstract class OTLPExporterNodeBase<
|
|||
onSuccess: () => void,
|
||||
onError: (error: otlpTypes.OTLPExporterError) => void
|
||||
): void {
|
||||
if (this._isShutdown) {
|
||||
if (this._shutdownOnce.isCalled) {
|
||||
diag.debug('Shutdown already started. Cannot send objects');
|
||||
return;
|
||||
}
|
||||
|
|
@ -110,7 +109,6 @@ export abstract class OTLPExporterNodeBase<
|
|||
}
|
||||
|
||||
onShutdown(): void {
|
||||
this._isShutdown = true;
|
||||
if (this.serviceClient) {
|
||||
this.serviceClient.close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,6 +109,9 @@ export abstract class OTLPExporterBase<
|
|||
return this._shutdownOnce.call();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by _shutdownOnce with BindOnceFuture
|
||||
*/
|
||||
private _shutdown(): Promise<void> {
|
||||
diag.debug('shutdown started');
|
||||
this.onShutdown();
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
"dependencies": {
|
||||
"@grpc/proto-loader": "^0.6.4",
|
||||
"@opentelemetry/core": "1.0.1",
|
||||
"@opentelemetry/exporter-trace-otlp-http": "0.27.0",
|
||||
"@opentelemetry/exporter-trace-otlp-http": "1.0.1",
|
||||
"@opentelemetry/resources": "1.0.1",
|
||||
"@opentelemetry/sdk-trace-base": "1.0.1",
|
||||
"protobufjs": "^6.9.0"
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ export abstract class OTLPExporterNodeBase<
|
|||
}
|
||||
|
||||
override onInit(config: OTLPExporterNodeConfigBase): void {
|
||||
this._isShutdown = false;
|
||||
// defer to next tick and lazy load to avoid loading protobufjs too early
|
||||
// and making this impossible to be instrumented
|
||||
setImmediate(() => {
|
||||
|
|
@ -76,7 +75,7 @@ export abstract class OTLPExporterNodeBase<
|
|||
onSuccess: () => void,
|
||||
onError: (error: otlpTypes.OTLPExporterError) => void
|
||||
): void {
|
||||
if (this._isShutdown) {
|
||||
if (this._shutdownOnce.isCalled) {
|
||||
diag.debug('Shutdown already started. Cannot send objects');
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue