DataDog / dd-sdk-android

Datadog SDK for Android (Compatible with Kotlin and Java)
Apache License 2.0
159 stars 61 forks source link

Apollo/GraphQL integration #1494

Open lwasyl opened 1 year ago

lwasyl commented 1 year ago

Are you requesting automatic instrumentation for a framework or library? Please describe.

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Apollo is a networking library, it'd be beneficial to trace its performance, like timings when fetching thing from cache, as well as tracings related to various requests and tags for the call (e.g. calls with APQ vs calls without APQ)

Describe the solution you'd like an ApolloInterceptor implementation tracing as much as makes sense, as well as OkHttp interceptor that tracks Graphql-specific headers (if it doesn't do that yet)

Describe alternatives you've considered Writing everything manually

Additional context Add any other context or screenshots about the feature request here.

0xnm commented 1 year ago

Hello @lwasyl! Thanks for opening the feature request.

Indeed, we are aware of this quite common need and this is what we are currently working on. I cannot give any estimates right now, because apart of the GraphQL support in our SDK we need to do changes in our webapp in order to better visualize it, but I can say for sure that this feature will land in our SDK later this year.

lwasyl commented 1 year ago

I'll just point out that Apollo 4.x will also support Ktor backend — it'd be nice if DD integration also worked with it, and not only with OkHttp one initial support PR: https://github.com/apollographql/apollo-kotlin/pull/5142

0xnm commented 1 year ago

Hello @lwasyl! Can you please tell us about your usage of Ktor - are you using the client in Kotlin Multiplatform Mobile project? Or your project is only for Android, without multiplatform capabilities?

lwasyl commented 1 year ago

Hey @0xnm I'm not using ktor backend yet, but when Apollo-Kotlin 4.x is out we'll definitely consider/evaluate it wrt performance. Multiplatform usage of Apollo-Kotlin is something on our radar but not in immediate plans