open-telemetry / opentelemetry-js

OpenTelemetry JavaScript Client
https://opentelemetry.io
Apache License 2.0
2.56k stars 742 forks source link

GRPC exporter for web clients #2806

Open Ancient-Dragon opened 2 years ago

Ancient-Dragon commented 2 years ago

NB: Before opening a feature request against this repo, consider whether the feature should/could be implemented in the other OpenTelemetry client libraries. If so, please open an issue on opentelemetry-specification first.

Is your feature request related to a problem? Please describe.

The problem I'm facing is that @opentelemetry/exporter-trace-otlp-grpc states that it for web, but when I have tried to make it work it just throws a bunch of errors in my frontend client. After doing some research it appears as though it shouldn't suggest it is for web because it uses: @grpc/grpc-js which is for node-js and rather it should be using grpc-web.

Describe the solution you'd like

Ideally I'd like to be able to have my traces sent to my collector using a GRPC exporter in my frontend client.

Describe alternatives you've considered

Alternatives are currently to use https.

Additional context

None that I know of.

dyladan commented 2 years ago

Hmm sorry for the incorrect docs. The OTLP/HTTP exporter works in the web and exports using JSON over HTTP.

Ancient-Dragon commented 2 years ago

No worries, that's why I made this a feature request to see if a grpc-web exporter could be made, if not please feel free to close this.

vmarchaud commented 2 years ago

If i'm not mistaken there is no way of using the official grpc client in the browser ? There are alternatives (https://github.com/improbable-eng/grpc-web or https://github.com/grpc/grpc-web) but this would requires making new exporters i believe

Ancient-Dragon commented 2 years ago

Yes that is the ask of this feature request, to make a new exporter library using the grpc-web dependency.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

devgalintown commented 11 months ago

Do we have any way to use grpc web trace exporter now?

pksorensen commented 2 months ago

This would make sense to have, as there are collectors only supporting grpc. https://github.com/dotnet/aspire/issues/3688