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

Drop support for package grpc in instrumentation and examples #3780

Closed
1 task done
llc1123 opened this issue May 4, 2023 · 5 comments · Fixed by #3807
Closed
1 task done

Drop support for package grpc in instrumentation and examples #3780

llc1123 opened this issue May 4, 2023 · 5 comments · Fixed by #3807

Comments

@llc1123
Copy link
Contributor

llc1123 commented May 4, 2023

  • This only affects the JavaScript OpenTelemetry library

As the package grpc has been deprecated for whole 2 years, everyone should avoid using the package, or at least, in new projects.

Also, the node-gyp part of its installation has never been successful on Windows machines (with the latest node.js runtime), which is annoying for Windows developers like me. I can do the development in WSL2 but it is still a problem if I need to do the web stuff.

So I suggest we drop the support of the package in instrumentation-grpc and remove the grpc example.

@pvogel1967
Copy link

This seems particularly appropriate since there's currently a chicken-egg problem in that @opentelemetry/exporter-metrics-grpc itself loads the grpc library which happens before instrumentation is installed, so you always get the warning that you are trying to instrument a library which has already been loaded and so the instrumentation won't work.

@llc1123
Copy link
Contributor Author

llc1123 commented May 10, 2023

This seems particularly appropriate since there's currently a chicken-egg problem in that @opentelemetry/exporter-metrics-grpc itself loads the grpc library which happens before instrumentation is installed, so you always get the warning that you are trying to instrument a library which has already been loaded and so the instrumentation won't work.

I think the problem will still exist if we keep the package @grpc/grpc-js but I am not sure.

@pichlermarc
Copy link
Member

We're actually already using @grpc/grpc-js in the exporters.
Though @opentelemetry/exporter-metrics-otlp-grpc and it's base package is applying some trickery that should prevent that from happening. @pvogel1967 would you mind checking and opening a bug issue if this problem persists in the most recent versions?

@pichlermarc
Copy link
Member

pichlermarc commented May 11, 2023

I'm not sure what the original reason for combining the instrumentations was, but I'd be all for de-supporting instrumentations for deprecated libraries.

WDYT @open-telemetry/javascript-approvers?

@Flarna
Copy link
Member

Flarna commented May 11, 2023

istrumentation for grpc was created quite some time before instrumentation for grpc-js was added. They share quite some code. An alternative would have been to create a third package grpc instrumentation base but well that ship has sailed.
Meanwhile grpc has been deprecated.

As instrumentation is experimental it's likely ok to remove support for grpc. We removed support for older node.js versions also without moving to 2.0 therefore I think it should be fine to remove grpc in the next minor release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants