opentelemetry-js icon indicating copy to clipboard operation
opentelemetry-js copied to clipboard

GRPC exporter for web clients

Open Ancient-Dragon opened this issue 3 years ago • 7 comments
trafficstars

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.

Ancient-Dragon avatar Feb 26 '22 21:02 Ancient-Dragon

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

dyladan avatar Mar 03 '22 17:03 dyladan

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.

Ancient-Dragon avatar Mar 04 '22 08:03 Ancient-Dragon

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

vmarchaud avatar Mar 05 '22 08:03 vmarchaud

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

Ancient-Dragon avatar Mar 05 '22 15:03 Ancient-Dragon

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.

github-actions[bot] avatar May 09 '22 06:05 github-actions[bot]

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

devgalintown avatar Jul 25 '23 18:07 devgalintown

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

pksorensen avatar May 08 '24 10:05 pksorensen