shibuya-kafka-adapter 0.5.0.1 → 0.6.0.0
raw patch · 3 files changed
+35/−24 lines, 3 filesdep ~hs-opentelemetry-apidep ~hs-opentelemetry-semantic-conventionsdep ~kafka-effectfulPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: hs-opentelemetry-api, hs-opentelemetry-semantic-conventions, kafka-effectful, shibuya-core
API changes (from Hackage documentation)
Files
- CHANGELOG.md +23/−0
- README.md +4/−16
- shibuya-kafka-adapter.cabal +8/−8
CHANGELOG.md view
@@ -1,5 +1,28 @@ # Changelog +## 0.6.0.0 — 2026-05-31++### Breaking Changes++- Tracks the `shibuya-core 0.6.0.0` release and the `hs-opentelemetry`+ 1.0 package set. The framework's per-message OpenTelemetry span now+ emits `messaging.operation.type="process"` instead of the deprecated+ `messaging.operation="process"` key. Dashboards, alerts, and trace+ queries filtering on the old key must be updated.+- Bumps the `kafka-effectful` dependency to `^>=0.3.0.0`, the first+ release with native `hs-opentelemetry` 1.0 support.++### Other Changes++- Bumps direct OpenTelemetry dependencies to+ `hs-opentelemetry-api ^>=1.0` and+ `hs-opentelemetry-semantic-conventions ^>=1.40`.+- Bumps example-only OpenTelemetry dependencies to the 1.0 package set:+ `hs-opentelemetry-sdk`, `hs-opentelemetry-exporter-otlp`, and+ `hs-opentelemetry-instrumentation-hw-kafka-client`.+- Updates the OpenTelemetry examples for the 1.0+ `shutdownTracerProvider` API, which now takes an optional timeout.+ ## 0.5.0.1 — 2026-05-08 ### Changed
README.md view
@@ -6,27 +6,15 @@ ## Packages -- `shibuya-kafka-adapter` — the adapter library (`Shibuya.Adapter.Kafka`, `.Config`, `.Convert`, `.Tracing`).+- `shibuya-kafka-adapter` — the adapter library (`Shibuya.Adapter.Kafka`, `.Config`, `.Convert`). - `shibuya-kafka-adapter-bench` — micro-benchmarks for the conversion hot path (`ConsumerRecord` → `Envelope`, W3C header extraction, timestamps). - `shibuya-kafka-adapter-jitsurei` — runnable examples: `BasicConsumer`, `MultiTopic`, `MultiPartition`, `OffsetManagement`. -## Tracing (opt-in)--`Shibuya.Adapter.Kafka.Tracing.traced` is an opt-in stream transformer that wraps each emitted `Ingested` so that the downstream handler's eventual `finalize` call runs inside a Consumer-kind OpenTelemetry span named following the messaging convention `"<destination> <operation>"` — e.g. `"orders process"` for a topic named `orders`. The span inherits the envelope's W3C `traceparent` as parent (from `Envelope.traceContext`) or opens a fresh root span when no parent is present, and is populated with the spec-aligned messaging attributes (`messaging.system=kafka`, `messaging.destination.name`, `messaging.operation=process`, `messaging.message.id`) and the Kafka-specific typed attributes `messaging.kafka.destination.partition` (Int64) and `messaging.kafka.message.offset` (Int64) when available. A caller that does not import this module pays nothing — no spans are opened and the adapter's public surface is unchanged.--Typical wiring:+## Tracing -```haskell-import Shibuya.Adapter.Kafka (kafkaAdapter, defaultConfig)-import Shibuya.Adapter.Kafka.Tracing (traced)-import Shibuya.Telemetry.Effect (runTracing)+Tracing is handled by `shibuya-core`'s supervised runner. `Shibuya.Adapter.Kafka.Convert.consumerRecordToEnvelope` populates `Envelope.attributes` with `messaging.system=kafka` and the Kafka-specific typed attributes `messaging.kafka.destination.partition` (Int64) and `messaging.kafka.message.offset` (Int64). The framework merges those onto its single Consumer-kind per-message span alongside `messaging.destination.name`, `messaging.operation.type=process`, and `messaging.message.id`. -runTracing tracer $ do- Adapter{source} <- kafkaAdapter (defaultConfig [TopicName "orders"])- Stream.fold Fold.drain- $ Stream.mapM userHandler- $ traced (TopicName "orders") source-```+The old opt-in `Shibuya.Adapter.Kafka.Tracing` module was removed in `0.5.0.0`; callers should run the Kafka adapter through Shibuya's normal `runApp` or `runWithMetrics` path instead of wrapping the stream. ## Building
shibuya-kafka-adapter.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.12 name: shibuya-kafka-adapter-version: 0.5.0.1+version: 0.6.0.0 synopsis: Kafka adapter for the Shibuya queue processing framework description: A Shibuya adapter that integrates with Apache Kafka via kafka-effectful@@ -56,12 +56,12 @@ , bytestring ^>=0.12 , containers ^>=0.7 , effectful-core ^>=2.6.1.0- , hs-opentelemetry-api ^>=0.3- , hs-opentelemetry-semantic-conventions ^>=0.1+ , hs-opentelemetry-api ^>=1.0+ , hs-opentelemetry-semantic-conventions ^>=1.40 , hw-kafka-client >=5.3 && <6 , hw-kafka-streamly ^>=0.2- , kafka-effectful ^>=0.1- , shibuya-core ^>=0.5+ , kafka-effectful ^>=0.3.0.0+ , shibuya-core ^>=0.6.0.0 , stm ^>=2.5 , streamly ^>=0.11 , streamly-core ^>=0.3@@ -102,13 +102,13 @@ , bytestring , containers , effectful-core- , hs-opentelemetry-api ^>=0.3- , hs-opentelemetry-semantic-conventions ^>=0.1+ , hs-opentelemetry-api ^>=1.0+ , hs-opentelemetry-semantic-conventions ^>=1.40 , hw-kafka-client , kafka-effectful , process , random- , shibuya-core+ , shibuya-core ^>=0.6.0.0 , shibuya-kafka-adapter , stm , streamly