dd-trace-java icon indicating copy to clipboard operation
dd-trace-java copied to clipboard

http4s integration

Open tyrcho opened this issue 4 years ago • 10 comments

As discussed today with @andrewsouthard1 @sallareznov and @cverdier we are going to work soon (days, weeks) on a http4s instrumentation since this is our http framework of choice @colisweb

We'd appreciate if from @Datadog team you could enhance the contributing page to answer a few questions:

  • [x] how to build a new version of the agent ? how to unit test ? answer
  • [x] what are the core concepts when designing a new integration ?

From @colisweb side here is the plan for the first steps:

  • [x] build a POC application with an existing integration for a async framework which is not using threads (play ? akka-http?)
  • [x] make sure that with this POC we see correlated APM traces between incoming http requests and SQL requests (and maybe outgoing http requests)
  • [ ] check that we can attach our own spans to the trace created by the instrumentation
  • [ ] start building the http4s integration
  • [ ] test it on our POC application

tyrcho avatar Sep 30 '20 14:09 tyrcho

Hi @tyrcho - I added some more information about adding an instrumentation in contributing.md. Please let us know if this is enough to get started, we can add more detail if required in certain places along the way.

richardstartin avatar Sep 30 '20 17:09 richardstartin

Hi, thanks for the information, I think it will be enough, we might some questions in the future. Do you prefer that we ask general contribution questions here on in dedicated issues ?

@cverdier @sallareznov I noticed an existing play project from which we can start for our POC, we'd just need to add a Doobie dependency.

tyrcho avatar Oct 02 '20 14:10 tyrcho

Hey @tyrcho - please do let us know if you have any questions or need assistance here.

andrewsouthard1 avatar Oct 20 '20 11:10 andrewsouthard1

Hey, we did not really start yet ... Someone from my team will first check how the existing akka-http integration works with JDBC (probably in the next 10 days or so)

On Tue, Oct 20, 2020 at 1:03 PM Andrew Southard [email protected] wrote:

Hey @tyrcho https://github.com/tyrcho - please do let us know if you have any questions or need assistance here.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DataDog/dd-trace-java/issues/1934#issuecomment-712771086, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFK6ZCDI5E3OYZ6W2MSSSLSLVU6RANCNFSM4R7FMGXQ .

tyrcho avatar Oct 20 '20 20:10 tyrcho

Hi, we made some progress on the POC and have identified one extra step which we want to check before building the instrumentation :

  • [ ] check that we can attach our own spans to the trace created by the instrumentation

Any pointers on how this can be done ?

tyrcho avatar Nov 30 '20 09:11 tyrcho

@tyrcho You can manually create spans using the OpenTracing api by following the instructions here. On that same page, there are instructions for creating a span with the @Trace annotation, or using dd.trace.methods config

randomanderson avatar Dec 02 '20 18:12 randomanderson

Hi all! Any updates on this?

veysiertekin avatar Nov 08 '21 17:11 veysiertekin

@tyrcho @cverdier @sallareznov Did you guys start something? Can we see? Can we help? 🙂

Edit: Someone started a PR to implement a integration with Blaze: https://github.com/DataDog/dd-trace-java/pull/3131

guizmaii avatar Dec 01 '21 07:12 guizmaii

Any updates?

jhmartin avatar Feb 22 '22 23:02 jhmartin

We ended up using the Netty backend for http4s which is already supported by datadog, so I don't think we will do this implementation, sorry. Maybe @cverdier you'd like to provide more technical details ?

tyrcho avatar Feb 24 '22 13:02 tyrcho