Giter Site home page Giter Site logo

Add Datadog graphql trace about bramble HOT 8 CLOSED

marcosuma avatar marcosuma commented on June 5, 2024
Add Datadog graphql trace

from bramble.

Comments (8)

nmaquet avatar nmaquet commented on June 5, 2024 1

Thanks for confirming @marcosuma. I've released https://github.com/movio/bramble/releases/tag/v1.4.8

from bramble.

nmaquet avatar nmaquet commented on June 5, 2024

Hey @marcosuma! Yes, you should be able to write a plugin for your use case. At Movio, we use AWS X-Ray for tracing so we've developed a plugin for it. I've created a gist for you to have a look at the code: https://gist.github.com/nmaquet/0c04308d7ae7c234387926cf4c7e791c

As you can see from the X-Ray plugin, most of the heavy lifting happens in Init, WrapGraphQLClientTransport and InterceptRequest. I'm quite confident you should be able to use a very similar approach for a Datadog plugin.

from bramble.

marcosuma avatar marcosuma commented on June 5, 2024

Thanks @nmaquet! That helps a lot. Is there a way I can get access to GraphQL errors in a plugin? What I would basically like to do is to trace those errors and publish metrics about it. Current situation is that if I capture the body response with a http.RoundTripper whenever there is an error the response.body is actually empty (here's a gist about it)

from bramble.

nmaquet avatar nmaquet commented on June 5, 2024

Hey @marcosuma. If you want easy access to GraphQL errors, the Plugin interface needs to be extended a bit. I've done so here: #205 Can you give this a shot and we'll try and merge this and release it soon.

from bramble.

marcosuma avatar marcosuma commented on June 5, 2024

That's awesome! I can try to clone it and test it locally, but are you plannign to release a new version?

from bramble.

nmaquet avatar nmaquet commented on June 5, 2024

@marcosuma Yes, that's the plan. Could you test it on your side and let me know whether this works for you? Once you confirm that you've tested it, we'll do a release. Thanks!

from bramble.

marcosuma avatar marcosuma commented on June 5, 2024

I did a quick test on how to integrate it with dd-trace and it seems working. This is a way I am trying to use it https://gist.github.com/marcosuma/e3b0e095b11f1dfff09f6ad24c349bf3

FYI I am not fully able to test the whole end-to-end path until this is released as a new version. But LGTM!

from bramble.

nmaquet avatar nmaquet commented on June 5, 2024

Closing this issue @marcosuma. Feel free to ask additional question if you have them, though.

from bramble.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.