packages feed

shikumi-trace-otel 0.1.2.0 → 0.1.2.1

raw patch · 4 files changed

+82/−67 lines, 4 filesdep ~baikaidep ~shikumi-cachedep ~shikumi-evalPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: baikai, shikumi-cache, shikumi-eval, shikumi-trace, shikumi-trace-otel

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -2,6 +2,12 @@  ## Unreleased +## 0.1.2.1 — 2026-10-05++- Refresh internal package bounds and Haddock links; no public API change.++- Move the dependency on `mori://shinzui/baikai/packages/baikai` to `>=0.7.1.0 && <0.8`. Bounds only; no source changed.+ ## 0.1.2.0 — 2026-09-08  - Add the missing `bytestring` upper bound (`>=0.11 && <0.13`), matching the
shikumi-trace-otel.cabal view
@@ -1,10 +1,10 @@-cabal-version:   3.4-name:            shikumi-trace-otel-version:         0.1.2.0+cabal-version: 3.4+name: shikumi-trace-otel+version: 0.1.2.1 synopsis:   OpenTelemetry export of shikumi hierarchical trace trees (EP-7) -category:        AI+category: AI description:   An opt-in OpenTelemetry adapter for shikumi's hierarchical trace trees.   'Shikumi.Trace.OpenTelemetry.exportTree' walks a finished 'TraceTree' and emits@@ -15,20 +15,26 @@   dependency tree is isolated in this package, mirroring baikai's   @baikai-trace-otel@ split. -license:         BSD-3-Clause-author:          Nadeem Bitar-maintainer:      nadeem@gmail.com-build-type:      Simple+license: BSD-3-Clause+author: Nadeem Bitar+maintainer: nadeem@gmail.com+build-type: Simple extra-doc-files: CHANGELOG.md  common common-options   ghc-options:-    -Wall -Wcompat -Widentities -Wincomplete-uni-patterns-    -Wincomplete-record-updates -Wredundant-constraints-    -fhide-source-paths -Wmissing-export-lists -Wpartial-fields+    -Wall+    -Wcompat+    -Widentities+    -Wincomplete-uni-patterns+    -Wincomplete-record-updates+    -Wredundant-constraints+    -fhide-source-paths+    -Wmissing-export-lists+    -Wpartial-fields     -Wmissing-deriving-strategies -  default-language:   GHC2024+  default-language: GHC2024   default-extensions:     DeriveAnyClass     DuplicateRecordFields@@ -36,58 +42,61 @@     OverloadedStrings  library-  import:          common-options-  hs-source-dirs:  src+  import: common-options+  hs-source-dirs: src   exposed-modules:     Shikumi.Trace.LiveExport     Shikumi.Trace.OpenTelemetry    build-depends:-    , aeson                                  >=2.2      && <2.3-    , baikai                                 >=0.7.0.0  && <0.8-    , base                                   >=4.20     && <5-    , bytestring                             >=0.11     && <0.13-    , containers                             >=0.6      && <0.9-    , generic-lens                           >=2.2      && <2.4-    , hs-opentelemetry-api                   >=1.0      && <1.1-    , hs-opentelemetry-exporter-otlp         >=1.0      && <1.1-    , hs-opentelemetry-sdk                   >=1.0      && <1.1-    , hs-opentelemetry-semantic-conventions  >=1.40     && <2-    , lens                                   ^>=5.3-    , scientific                             >=0.3      && <0.4-    , shikumi                                ^>=0.4.0.0-    , shikumi-trace                          ^>=0.3.0.0-    , text                                   ^>=2.1-    , time                                   >=1.12     && <1.17-    , unordered-containers                   >=0.2      && <0.3+    aeson >=2.2 && <2.3,+    baikai >=0.7.1.0 && <0.8,+    base >=4.20 && <5,+    bytestring >=0.11 && <0.13,+    containers >=0.6 && <0.9,+    generic-lens >=2.2 && <2.4,+    hs-opentelemetry-api >=1.0 && <1.1,+    hs-opentelemetry-exporter-otlp >=1.0 && <1.1,+    hs-opentelemetry-sdk >=1.0 && <1.1,+    hs-opentelemetry-semantic-conventions >=1.40 && <2,+    lens ^>=5.3,+    scientific >=0.3 && <0.4,+    shikumi ^>=0.4.0.0,+    shikumi-trace ^>=0.3.0.1,+    text ^>=2.1,+    time >=1.12 && <1.17,+    unordered-containers >=0.2 && <0.3,  test-suite shikumi-trace-otel-test-  import:         common-options-  type:           exitcode-stdio-1.0+  import: common-options+  type: exitcode-stdio-1.0   hs-source-dirs: test-  main-is:        Main.hs-  other-modules:  BillingSpec-  ghc-options:    -threaded -with-rtsopts=-N+  main-is: Main.hs+  other-modules: BillingSpec+  ghc-options:+    -threaded+    -with-rtsopts=-N+   build-depends:-    , aeson-    , baikai-    , base-    , bytestring-    , containers-    , effectful-    , generic-lens-    , hs-opentelemetry-api                 >=1.0      && <1.1-    , hs-opentelemetry-exporter-in-memory  >=1.0      && <1.1-    , hs-opentelemetry-sdk                 >=1.0      && <1.1-    , lens-    , shikumi                              ^>=0.4.0.0-    , shikumi-cache                        ^>=0.2.0.0-    , shikumi-eval                         ^>=0.3.0.0-    , shikumi-testing                      ^>=0.1.0.0-    , shikumi-trace                        ^>=0.3.0.0-    , shikumi-trace-otel                   ^>=0.1.2.0-    , tasty-    , tasty-hunit-    , text-    , time-    , unordered-containers+    aeson,+    baikai,+    base,+    bytestring,+    containers,+    effectful,+    generic-lens,+    hs-opentelemetry-api >=1.0 && <1.1,+    hs-opentelemetry-exporter-in-memory >=1.0 && <1.1,+    hs-opentelemetry-sdk >=1.0 && <1.1,+    lens,+    shikumi ^>=0.4.0.0,+    shikumi-cache ^>=0.2.0.1,+    shikumi-eval ^>=0.3.0.1,+    shikumi-testing ^>=0.1.0.0,+    shikumi-trace ^>=0.3.0.1,+    shikumi-trace-otel ^>=0.1.2.1,+    tasty,+    tasty-hunit,+    text,+    time,+    unordered-containers,
src/Shikumi/Trace/LiveExport.hs view
@@ -1,8 +1,8 @@ -- | Live OpenTelemetry export of a shikumi 'TraceTree' (EP-17). -- -- 'Shikumi.Trace.OpenTelemetry.exportTree' turns a finished tree into nested OTel--- spans against a 'Otel.Tracer', but a bare tracer exports nothing on its own — it--- needs a 'TracerProvider' holding a span processor that wraps an exporter. This+-- spans against a t'OpenTelemetry.Trace.Core.Tracer', but a bare tracer exports nothing on its own — it+-- needs a t'OpenTelemetry.Trace.Core.TracerProvider' holding a span processor that wraps an exporter. This -- module supplies that orchestration: -- --   * 'exportTreeWith' builds a provider from a given 'SpanProcessor', makes a@@ -35,7 +35,7 @@ import Shikumi.Trace (TraceTree) import Shikumi.Trace.OpenTelemetry (exportTree) --- | Build a 'TracerProvider' around the given processor, export the tree+-- | Build a t'OpenTelemetry.Trace.Core.TracerProvider' around the given processor, export the tree -- through the shared 'exportTree' walker, then flush and shut the provider -- down. The shutdown runs under 'bracket', so an exception thrown while -- exporting still flushes buffered spans and releases the provider before
src/Shikumi/Trace/OpenTelemetry.hs view
@@ -2,11 +2,11 @@ -- -- Unlike baikai's @baikai-trace-otel@ (one flat span per provider call), -- 'exportTree' preserves the tree's parent/child nesting: it walks from the root--- depth-first and creates each child span in a 'Context' carrying its parent span+-- depth-first and creates each child span in a t'OpenTelemetry.Context.Context' carrying its parent span -- (via 'OpenTelemetry.Context.insertSpan'), the explicit-context approach for -- reconstructing a recorded tree rather than discovering it from the live call--- stack. Each span's start time comes from the recorded 'startedAt'. Closed--- spans end at their recorded 'endedAt'; never-closed spans end at their own+-- stack. Each span's start time comes from the recorded 'Shikumi.Trace.startedAt'. Closed+-- spans end at their recorded 'Shikumi.Trace.endedAt'; never-closed spans end at their own -- start time and carry @shikumi.incomplete = true@. -- -- LM-call spans carry GenAI semantic-convention attributes@@ -54,7 +54,7 @@ import Shikumi.Trace.Node (renderNodePath)  -- | Export a finished trace tree to a tracer as a forest of nested spans. Pure--- structural ('ProgramSpan' / 'ModuleSpan' / 'CombinatorSpan') and LM-call+-- structural ('ProgramSpan' \/ 'ModuleSpan' \/ 'CombinatorSpan') and LM-call -- ('LlmCallSpan') nodes alike become spans; nesting is preserved. exportTree :: (MonadIO m) => Otel.Tracer -> TraceTree -> m () exportTree tracer tree = liftIO $ do@@ -124,8 +124,8 @@ endTimeOf s = fromMaybe (s ^. #startedAt) (s ^. #endedAt)  -- | Status for an exported span. A recorded response that reports an in-band--- provider failure becomes 'Otel.Error'; all other spans are explicitly marked--- 'Otel.Ok'.+-- provider failure becomes 'OpenTelemetry.Trace.Core.Error'; all other spans are explicitly marked+-- 'OpenTelemetry.Trace.Core.Ok'. statusFor :: Span -> Otel.SpanStatus statusFor s   | maybe False isErrorResponse (s ^. #attrs . #response) =