v0.15.0
We are happy to announce the 0.15.0 release.
[!NOTE] The
otel4s-sdk*modules have been moved to a new repository and now have their own release cycle.
[!WARNING] There are several minor binary- and source-breaking changes. Primarily around
BaggageManagerand*Testkitbuilders. Several deprecated methods were also removed.
Key changes
1. SDK modules moved to a separate repository
The otel4s-sdk modules have been moved out of this repository. The primary reason for this is to allow other libraries, such as fs2 and http4s, to use otel4s directly.
2. BaggageManager.noop
BaggageManager now exposes a noop implementation. This is particularly useful in tests when you don't care about baggage propagation.
val baggageManager: BaggageManager[IO] = BaggageManager.noop
3. Span finalizer API updates
SpanFinalizer internal classes are now private, since they were never intended to be public.
There are also new combinators, such as updateName, addEvent, or addLink.
4. Tracer.withCurrentSpanOrNoop
There is a new withCurrentSpanOrNoop convenience method on Tracer to simplify working with optional span context.
Before:
Tracer[IO].currentSpanOrNoop.flatMap(_.addAttribute(Attribute("key", "value")))
After:
Tracer[IO].withCurrentSpanOrNoop(_.addAttribute(Attribute("key", "value")))
5. Attribute.From for semantic convention values
Semantic convention *Value classes now provide Attribute.From instances, making it easier to build attributes from semantic convention values.
Before:
val attribute: Attribute[String] = NetworkTransport(NetworkTransportValue.Tcp.value)
After:
val attribute: Attribute[String] = NetworkTransport(NetworkTransportValue.Tcp)
6. *Testkit builders
Testkit classes now use builders instead of static create/inMemory methods. This makes testkits easier to evolve without expanding the public API surface, and makes configuration more uniform across traces, metrics, and logs.
Old style (deprecated/removed):
TracesTestkit.inMemory[IO](
customize = (b: io.opentelemetry.sdk.trace.SdkTracerProviderBuilder) => b, /* your edits */
textMapPropagators = List(/* propagators */)
)
New style:
TracesTestkit
.builder[IO]
.addTracerProviderCustomizer(b => b /* your edits */)
.withTextMapPropagators(List(/* propagators */))
.build
Or via the new inMemory overload that customizes the builder:
TracesTestkit.inMemory[IO](
_.addTracerProviderCustomizer(b => b /* your edits */)
.withTextMapPropagators(List(/* propagators */))
)
This is the same pattern across oteljava LogsTestkit, MetricsTestkit, TracesTestkit, and OtelJavaTestkit: you now customize a Builder[F] via add...Customizer(...) methods, and you set exporters/readers via withInMemory...(...) on the builder rather than passing fromInMemory/exporter style parameters.
What's Changed
Core
- core-common: add
BaggageManager.noopby @iRevive in https://github.com/typelevel/otel4s/pull/1094 - core-trace: make
SpanFinalizerinner classes private, add missing API by @iRevive in https://github.com/typelevel/otel4s/pull/1159 - core-trace: add
withCurrentSpanOrNooputility toTracerby @iRevive in https://github.com/typelevel/otel4s/pull/1160 - Add builders for
*Testkitby @iRevive in https://github.com/typelevel/otel4s/pull/1126
Semantic Conventions
- semconv: add implicit
Attribute.Fromconverters forValueclasses by @iRevive in https://github.com/typelevel/otel4s/pull/1162
Documentation
- docs: add documentation for the
Logsmodule by @iRevive in https://github.com/typelevel/otel4s/pull/1119 - Add mention of
fs2-queuesotel4s integration by @satabin in https://github.com/typelevel/otel4s/pull/1132 - docs: add note where SDK modules were moved by @iRevive in https://github.com/typelevel/otel4s/pull/1155
- docs: add semantic conventions documentation by @iRevive in https://github.com/typelevel/otel4s/pull/1161
Dependencies
- Update opentelemetry-javaagent to 2.24.0 by @typelevel-steward[bot] in https://github.com/typelevel/otel4s/pull/1157
- Update opentelemetry-instrumentation-annotations to 2.24.0 by @typelevel-steward[bot] in https://github.com/typelevel/otel4s/pull/1156
- Update opentelemetry-api, ... to 1.58.0 by @typelevel-steward[bot] in https://github.com/typelevel/otel4s/pull/1151
- Update scalafmt-core to 3.10.4 by @typelevel-steward[bot] in https://github.com/typelevel/otel4s/pull/1158
- Update scala-library, scala-reflect to 2.13.18 by @typelevel-steward[bot]in https://github.com/typelevel/otel4s/pull/1137
- Update scala-library to 2.12.21 by @typelevel-steward[bot] in https://github.com/typelevel/otel4s/pull/1142
- Update http4s-circe, http4s-dsl, ... to 0.23.33 by @typelevel-steward[bot] in https://github.com/typelevel/otel4s/pull/1127
- Update pekko-http to 1.3.0 by @typelevel-steward[bot] in https://github.com/typelevel/otel4s/pull/1121
- Update pekko-stream to 1.4.0 by @typelevel-steward[bot] in https://github.com/typelevel/otel4s/pull/1143
- Update opentelemetry-proto to 1.9.0-alpha by @typelevel-steward[bot] in https://github.com/typelevel/otel4s/pull/1131
- Update sbt-typelevel, ... to 0.8.4 by @typelevel-steward[bot] in https://github.com/typelevel/otel4s/pull/1147
- Update sbt-scalajs, scalajs-compiler, ... to 1.20.2 by @typelevel-steward[bot] in https://github.com/typelevel/otel4s/pull/1152
- Update sbt-javaagent to 0.2.0 by @typelevel-steward[bot] in https://github.com/typelevel/otel4s/pull/1141
- flake.lock: Update by @typelevel-steward[bot] in https://github.com/typelevel/otel4s/pull/1149
Uncategorized
- Update otel4s-opentelemetry-javaagent version by @iRevive in https://github.com/typelevel/otel4s/pull/1136
- Show Scaladex version badge by @iRevive in https://github.com/typelevel/otel4s/pull/1154
New Contributors
- @satabin made their first contribution in https://github.com/typelevel/otel4s/pull/1132
Full Changelog: https://github.com/typelevel/otel4s/compare/v0.14.0...v0.15.0