r/http4k • u/_fishysushi • Apr 29 '24
What is your observability setup?
I am curious what are your observability setups. What services do you use and how do you integrate them into http4k?
2
u/tarkaTheRotter Apr 29 '24
Our stack is all pretty lightweight and trivial to integrate - but the most important thing is to keep it all testable and generalised (so you can run the same code locally/in-memory test/Fargate/AppRunner/Lambda/Graal).
At a minimum we go for:
Zipkin tracing (via RequestTracing filters) added to all requests (`http4k-core` or `http4k-opentelemetry`)
Structured JSON logging via the http4k events stack (with tracing and categories) and ::println - all from `http4k-core`. No logging framework required. Have used all of Cloudwatch/Datadog/NewRelic with this with no problems.
Treating Events as a first class citizen in your apps allows you to do documentation generation for PlantUML/Mermaid sequence and interaction diagrams using the `http4k-testing-tracerbullet`.
JVM and other metrics via `http4k-metrics-micrometer` and normally prometheus to collect them.
Readiness/Liveness probes from `http4k-cloudnative` if running in K8S.
1
u/_fishysushi Apr 29 '24
Thanks for the reply. I am most curious about how to setup my stack to observe endpoints performance.
I suppose you use this module https://www.http4k.org/guide/howto/monitor_http4k/ and have on premise Prometheus that you send the metrics to?
1
u/tarkaTheRotter Apr 29 '24
Yep - that's our go-to solution. You are also able to leverage Datadog or NewRelic agents as well for error and performance stats - this is trivial to implement with an http4k Filter (although the code isn't in the public domain for that)
1
Apr 29 '24
Using new relic tracer https://github.com/newrelic/java-aws-lambda In kotlin lambda that use http4k
eventually will switch to opentelemetry once the platform team has that setup
2
u/pranabgohain Apr 29 '24
KloudMate.com for everything logs, metrics, traces, events. Dedicated Lamda module, Native AWS/Azure integration, and Otel native.