packages feed

kiroku-otel-0.1.0.0: kiroku-otel.cabal

cabal-version:   3.0
name:            kiroku-otel
version:         0.1.0.0
synopsis:
  OpenTelemetry W3C trace-context helpers for Kiroku event metadata

description:
  Pure helpers to inject and extract W3C trace-context (@traceparent@ and
  @tracestate@ header strings, per the W3C trace-context specification)
  into and out of the @metadata@ JSONB column carried by every Kiroku
  event. Provided as a sister package to keep @kiroku-store@ free of any
  @hs-opentelemetry@ dependency; consumers opt in by depending on this
  package directly.

author:          Nadeem Bitar
maintainer:      nadeem@gmail.com
license:         BSD-3-Clause
build-type:      Simple
category:        Database, Eventing, Observability
extra-doc-files: CHANGELOG.md
homepage:        https://github.com/shinzui/kiroku
bug-reports:     https://github.com/shinzui/kiroku/issues

source-repository head
  type:     git
  location: https://github.com/shinzui/kiroku.git

common common
  default-language:   GHC2024
  default-extensions:
    DeriveAnyClass
    DuplicateRecordFields
    OverloadedLabels
    OverloadedStrings

  ghc-options:        -Wall

library
  import:          common
  exposed-modules: Kiroku.Otel.TraceContext
  build-depends:
    , aeson                            >=2.1  && <2.3
    , base                             >=4.18 && <5
    , bytestring                       >=0.11 && <0.13
    , hs-opentelemetry-api             >=0.3  && <0.4
    , hs-opentelemetry-propagator-w3c  >=0.1  && <0.2
    , kiroku-store                     ^>=0.1
    , text                             >=2.0  && <2.2

  hs-source-dirs:  src

test-suite kiroku-otel-test
  import:         common
  type:           exitcode-stdio-1.0
  main-is:        Main.hs
  hs-source-dirs: test
  ghc-options:    -threaded -rtsopts -with-rtsopts=-N
  build-depends:
    , aeson                 >=2.1  && <2.3
    , base                  >=4.18 && <5
    , bytestring            >=0.11 && <0.13
    , hs-opentelemetry-api
    , hspec                 >=2.10 && <2.12
    , kiroku-otel
    , kiroku-store          ^>=0.1
    , text                  >=2.0  && <2.2
    , time                  >=1.12 && <1.15
    , uuid                  >=1.3  && <1.4