packages feed

kiroku-otel-0.2.0.0: kiroku-otel.cabal

cabal-version:   3.0
name:            kiroku-otel
version:         0.2.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.Subscription
    Kiroku.Otel.TraceContext

  build-depends:
    , aeson                                  >=2.1   && <2.3
    , base                                   >=4.18  && <5
    , bytestring                             >=0.11  && <0.13
    , containers                             >=0.6   && <0.8
    , generic-lens                           >=2.2   && <2.4
    , hs-opentelemetry-api                   ^>=1.0
    , hs-opentelemetry-propagator-w3c        ^>=1.0
    , hs-opentelemetry-semantic-conventions  ^>=1.40
    , kiroku-store                           ^>=0.2
    , lens                                   >=5.2   && <5.4
    , text                                   >=2.0   && <2.2
    , unordered-containers                   >=0.2   && <0.3

  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
    , containers                           >=0.6  && <0.8
    , ephemeral-pg                         >=0.2  && <0.3
    , generic-lens                         >=2.2  && <2.4
    , hasql-pool                           >=1.2  && <1.5
    , hs-opentelemetry-api
    , hs-opentelemetry-exporter-in-memory  ^>=1.0
    , hs-opentelemetry-sdk                 ^>=1.0
    , hspec                                >=2.10 && <2.12
    , kiroku-otel
    , kiroku-store                         ^>=0.2
    , kiroku-test-support
    , lens                                 >=5.2  && <5.4
    , stm                                  >=2.5  && <2.6
    , text                                 >=2.0  && <2.2
    , time                                 >=1.12 && <1.15
    , unordered-containers                 >=0.2  && <0.3
    , uuid                                 >=1.3  && <1.4