Giter Site home page Giter Site logo

Comments (5)

damdev avatar damdev commented on September 13, 2024 3

Hi @saraiva132 , I was making some changes on the module, just made a PR #4 where you can use the instrumentation as a Server Middleware and wrappers on your HttpClient's. The ideal way to use this is with the kamon-agent but that part it's not ready yet.
So if you wan't to try the module with the wrappers and give us some feedback, it will be great, in the spec's you can see how to use it:

https://github.com/kamon-io/kamon-http4s/pull/4/files#diff-4d79e65f0c8b6378c02b72f724f0c6e1R52

val client = HttpClientWrapper[IO](Client.fromHttpService[IO](service))

With the httpClient just wrap it with the HttpClientWrapper

https://github.com/kamon-io/kamon-http4s/pull/4/files#diff-21f9dd0d8ea0dc13854b99f10f406691R54

And for the server it's the same way as any http4s middleware:

HttpServerServiceWrapper(HttpService {
           case GET -> Root / "tracing" / "ok" =>  Ok("ok")
           case GET -> Root / "tracing" / "not-found"  => NotFound("not-found")
           case GET -> Root / "tracing" / "error"  => InternalServerError("This page will generate an error!")
         }

@ivantopo will publish an snapshot version with this PR so you can try it.

Thanks for your help!

from kamon-http4s.

cspinetta avatar cspinetta commented on September 13, 2024 2

@MoAllenBellevue thanks for your interest.

Right now we are working to support the new version 0.18.x. We hope in the coming days to get a snapshot so you can start to test it in your app.

Meanwhile, you can wait for this snapshot with the support or just publish the metrics yourself from your application using the reporter kamon-prometheus directly in your app.

I notify you when the snapshot is available.

from kamon-http4s.

dpsoft avatar dpsoft commented on September 13, 2024 2

@MoAllenBellevue @saraiva132 @damdev @cspinetta I was making some changes on the module and any feedback on #5 would be appreciated before the release!!

from kamon-http4s.

saraiva132 avatar saraiva132 commented on September 13, 2024

@cspinetta Any update on when this plugin will support http4s 0.18.x ? If I can help in any way I would also gladly contribute. Keep up the good work

from kamon-http4s.

dpsoft avatar dpsoft commented on September 13, 2024

closed with #7

from kamon-http4s.

Related Issues (18)

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.