-
Notifications
You must be signed in to change notification settings - Fork 806
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(otlp-grpc-exporter-base): avoid TypeError on exporter shutdown #4612
fix(otlp-grpc-exporter-base): avoid TypeError on exporter shutdown #4612
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but I'm curious how the types allowed shutdown
to be called if it doesn't exist in the first place. Probably not important for this PR, but our GRPC types might be wrong
Yes, I've been using We still have to use it as |
experimental/packages/otlp-grpc-exporter-base/src/grpc-exporter-transport.ts
Outdated
Show resolved
Hide resolved
hello @pichlermarc, Thanks for your fix (I need it to force flushing Can you please publish this new version ? |
On it, hoping to get the release out by monday 🙂 |
…pen-telemetry#4612) * fix(otlp-grpc-exporter-base): avoid TypeError on exporter shutdown * chore: update changelog * fix: use gRPC Client type over any * fixup! fix: use gRPC Client type over any * fix: use ts-lint/ts-ignore
…pen-telemetry#4612) * fix(otlp-grpc-exporter-base): avoid TypeError on exporter shutdown * chore: update changelog * fix: use gRPC Client type over any * fixup! fix: use gRPC Client type over any * fix: use ts-lint/ts-ignore
Which problem is this PR solving?
Calling
shutdown()
on any gRPC exporter throws a TypeError - preventing apps from gracefully shutting down.The transport should call
close()
instead ofshutdown()
on the_client
. The test I wrote for this case was entirely ineffective as I also managed to mock the wrong thing.Fixes #4611
Short description of the changes
this._client?.close()
instead ofthis._client?.shutdown()
Type of change
How Has This Been Tested?