Comments (5)
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.
@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.
@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.
@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.
closed with #7
from kamon-http4s.
Related Issues (18)
- The Context Headers are not properly propagated
- Spans get mixed up HOT 3
- Memory leak in span_processing_xxx metrics HOT 3
- Release 1.0.12 with http4s 0.20.0 support HOT 1
- Kamon 2.0 support HOT 9
- Scala 2.13 support HOT 1
- Blaze client loses context in callback HOT 14
- Release of 2.0.3 HOT 4
- Kamon context is not available to http4s logging middleware HOT 2
- Add support for Cats Effect 3 HOT 1
- Dynamic values in paths are not replaced with placeholders HOT 1
- Examples on README
- Update kamon-core HOT 2
- Kamon looses context when http4s client raises an exception
- Remove global mutable state in NameGenerator
- The X-B3-* Headers are not properly propagated when run the client inside a service HOT 1
- Properly finish the current span when an error occurs in a request
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kamon-http4s.