Releases: kamon-io/Kamon
v2.4.1 - JVM Thread States Metrics
This improvement was originally meant to go out with v2.4.0, but it slipped through the cracks. Sorry!
Improvements
- system: Add a new
jvm.threads.states
gauge tracking the number of threads on each possible state. Contributed by @getArtemUsername via #1075
v2.4.0 - Local Tail Sampling & More!
Introducing Local Tail Sampling
This release comes with a new way of ensuring you will get traces for slow and failed requests, at least locally: the Local Tail-based Sampler.
The quick summary is that the local tail sampler can keep finished spans in memory for a few seconds and then override their sampling decision if they reach a configurable latency or error count threshold. If you want the full story check out our post about how to keep traces for slow and failed requests.
You can enabled the local tail sampler with these settings:
kamon.trace {
span-reporting-delay = 20 seconds
local-tail-sampler {
enabled = yes
error-count-threshold = 1
latency-threshold = 1 second
}
}
Improvements
- datadog: The OkHttp dependency is now shaded into the Datadog reporter jar to avoid classpath clashes. Contributed by @seglo via #1069
- prometheus: Get easy access to the Prometheus scrape data through
PrometheusReporter.latestScrapeData()
in case you need it for exposing on your own HTTP server. Contributed by @ivantopo via #1079 - redis: The Jedis instrumentation now works with Jedis 2.x as well. There is still a known issue in #1082 that should get solved soon after. Contributed by @jtjeferreira via #1076
- apm: The Kamon APM reporter now drops old Spans that might be accumulated in the reporters' executor and comes with lower retries and backoff default settings. Contributed by @ivantopo via eeb0596 and 49aef33
Fixes
- bundle: Remove a misplaced
logback.xml
fromkamon-mongo
that was ending up in the bundle. Thanks @PavelPenkov for reporting the issue. Fixed by @ivantopo via d37cb48 - general: @Philippus helped us get a bunch of typos fixed!
v2.3.1 - Maintenance Release
Fixes
- play: The GuiceModule we include in the kamon-play instrumentation was not updated to start Kamon's scheduler after the updates we introduced in Kamon 2.3.0. This release adds a new
Kamon.initWithoutAttaching(...)
API that does the right initialization. This was reported and fixed by @ihostage, then @ivantopo just committed the lines via #1065.
v2.3.0 - GraalVM and Scala 3 Support
GraalVM
This is the first Kamon release that can be used in applications that target native images with GraalVM 🎉
There was a non-trivial amount of work under the hood to ensure we are not starting any threads on static initializers, and ensuring that everything that requires a thread is delayed until Kamon.init(...)
is called, and it works! All the core APIs, the Status Page, and all the reporters are now available to native image users.
The main driver for this change was bringing support for Quarkus, and that's where we are going next! Creating a quarkus extension for Kamon is going to be a bit more challenging than we expected, particularly because we can't use automatic instrumentation in there. Also, Quarkus encourages using SmallRye Context Propagation, but Kamon has its own Context Propagation mechanism in place. It will be a fun ride :).. Join our Discord server if you want to participate on that adventure.
Scala 3
Starting on this release, we are also publishing the Core, Status Page, and Reporter artifacts for Scala 3! We still need to put some work on publishing all of our instrumentation for Scala 3. If you want to give a hand, check out #1064 as a starting point.
New Features
- Support for Scala 3 was brought up by @dpsoft, building on the work started by @bplommer. Thanks a lot for this contribution!
- GraalVM Native Image support was contributed by @ivantopo via #1055
Fixes
- cassandra: Guard against unknown query formats in the Cassandra client instrumentation. Reported as #1058 and fixed by @ivantopo via c5ac1ea.
- akka-http: Handle sub-route rejections on the path matchers instrumentation. Thanks very much to @seglo for providing a reproducible for the issue via #1063. Fixed by @ivantopo on that same #1063 PR.
Deprecation Removals
- We completely removed the Scala Future Chaining instrumentation that was deprecated in v2.1.21. This included a few deprecated functions for creating Spans with the old instrumentation, and a tiny bit of instrumentation for Akka HTTP's FastFuture that is no longer necessary. Those instrumentation pieces were already disabled since v2.2.0, and shouldn't be missed at all after the upgrade. Full diff here: 39191f8.
v2.2.3 - Rediscala instrumentation
- kamon-redis: Add tracing for the rediscala library. Contributed by @SimunKaracic #1052
- kamon-jdbc: Add SQL parsing to get better operation names. Disabled by default because the performance impact is yet unclear. If you'd like to test it and report back, set
kamon.instrumentation.jdbc.parse-sql-for-operation-name
totrue
. Contributed by @Falmarri via #1013
v2.2.2 - Kamon-caffeine and various improvements
- kamon-opentelemetry: added missing span marks to otel exporter. Contributed by @pnerg via #1047
- kamon-core: Repair W3C span propagation, now with way more spec compliance. Contributed by @SimunKaracic, @the-overengineer and @dguggemos via #1045.
- kamon-system-metrics: Bump
oshi-core
to latest version. Contributed by @SimunKaracic via #1045 - kamon-caffeine: new module adding instrumentation for Caffeine synchronous caches. Tracing is done automatically, and for cache metrics, KamonStatsCounter is available, which needs to be added manually. Contributed by @SimunKaracic via #1051
v2.2.1 - Lettuce instrumentation
- kamon-datadog: Truncate 128-bit trace IDs before reporting to DataDog. Contributed by @dvgica via #1040. Fixes #1032
- kamon-bundle: Ensure that the temporary Kanela agent file extracted by the Bundle will be deleted after the JVM exits. Contributed by @ivantopo via #1036
- kamon-jdbc: Add support for HyperSQL. Contributed by @ivantopo via #1041
- kamon-jdbc: Bump hikariCP to the latest version. Contributed by @SimunKaracic via #1039
- kamon-status-page: Try to bind Status Page on a different port if the configured port is busy. Contributed by @ivantopo via #1042
- kamon-redis: Add tracing for the lettuce library. Contributed by @SimunKaracic via #1037
v2.2.0 - Future Instrumentation Rollback
🚨 This release changes the instrumentation behavior for Scala Futures 🚨
This release changes the way Kamon instruments Scala Futures, going back to the same behavior we had in Kamon 1.x. This change is going to be transparent for most users because most of them only use the automatic instrumentation, but there might be a small difference in how Spans and Context are related to each other after. Broadly speaking:
- In Kamon 2.x, a Scala Future and all the transformations applied to them (.map/.flatmap/etc) would form a "chain", and changes to the current context in any of the transformations would be carried on to the next transformation, as long as those changes are performed with the functions included in the
ScalaFutureInstrumentation
companion object. This change brought two challenges:- It makes it impossible to cache Future values because the Future itself was tied to the context available when the Future was created for the first time. This would manifest as traces with Spans that don't belong to them.
- It is possible to leave dirty threads or get unexpected relationships between Spans when not using the helper functions from the
ScalaFutureInstrumentation
companion object.
- In Kamon 1.x, a Scala Future would only be tied to its "execution context", making it possible to cache Future values and create Spans without concerns of leaving dirty threads, but context updates cannot be propagated through all transformations.
There is more information about the motivations for this change on #1021.
The Future Chaining instrumentation is still included in Kamon 2.2.0, but it is marked as deprecated and disabled by default. If you need to, you can bring it back with these configuration settings:
kanela.modules {
executor-service {
exclude += "scala.concurrent.impl.*"
}
scala-future {
enabled = true
}
akka-http {
instrumentations += "kamon.instrumentation.akka.http.FastFutureInstrumentation"
}
}
The Future Chaining instrumentation will be fully removed with Kamon 2.3.0.
Changes
v2.1.21 - Trace Helpers and Scala Future Chaining Deprecation
v2.1.20 Bug fix release
- kamon-redis: Fix #1027 by changing instrumentation so it does not use Jedis classes during loading, which leads to failures when Jedis is not on the classpath. Contributed by @SimunKaracic and @ivantopo via #1028 .