Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): use 1.x trace otlp http exporter #2788

Merged
merged 7 commits into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/exporter-trace-otlp-grpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand All @@ -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;
}
Expand All @@ -110,7 +109,6 @@ export abstract class OTLPExporterNodeBase<
}

onShutdown(): void {
this._isShutdown = true;
if (this.serviceClient) {
this.serviceClient.close();
}
Expand Down
3 changes: 3 additions & 0 deletions packages/exporter-trace-otlp-http/src/OTLPExporterBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion packages/exporter-trace-otlp-proto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand All @@ -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;
}
Expand Down