connectrpc / connect-es

The TypeScript implementation of Connect: Protobuf RPC that works.
https://connectrpc.com/
Apache License 2.0
1.36k stars 78 forks source link

Otel support just like otelconnect-go does #988

Closed danvergara closed 7 months ago

danvergara commented 8 months ago

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

Is there a way to add support for Open Telemetry instrumentation just like connect-go has? The current stack of the company I work for has some apps using connect and we're in the middle of the endeavor of instrumenting the most critical apps and workflows we maintain.

Describe the solution you'd like There's a function called createConnectTransport that has a field called interceptors that can be used to intercept requests to add headers such as traceparent.

The request is for Connect for Node.js

Describe alternatives you've considered Another alternative is doing that by ourselves, but we might need an example.

srikrsna-buf commented 8 months ago

Another alternative is doing that by ourselves, but we might need an example.

With #982 merged, in the next release you can use an interceptor to add this functionality. I'll post an example here once the docs are updated

danvergara commented 8 months ago

@srikrsna-buf Nice! Looking forward to it!

Thanks!

srikrsna-buf commented 8 months ago

We just published a preview release with support for server side interceptors: npm i @connectrpc/connect@next.

The docs for interceptors are here.

danvergara commented 8 months ago

Looking forward for the actual release!

In the meantime, I'll read the docs and telling my teammates that the solution to our current issue is on its way.

Thanks for the support @srikrsna-buf!!!

chrispine commented 7 months ago

Closing this issue, but feel free to re-open (or create a new issue) if needed. Thanks!

danvergara commented 7 months ago

Well, I'd like to keep it open until v1.4.0 comes out. At least, I'd like to know how long until the next release. My CTO is asking me.

chrispine commented 7 months ago

Sure, we can do that. Unsure of the release date at the moment, but I'll look into it.

danvergara commented 7 months ago

Thanks @chrispine Really appreciated.

chrispine commented 7 months ago

Here you go, @danvergara: https://github.com/connectrpc/connect-es/releases/tag/v1.4.0

I'll close this now, but as always, reach back out or re-open if needed. Thanks!

danvergara commented 7 months ago

Thanks so much!!!!!!!!!