cabal-version: 3.0
name: hasql-opentelemetry
version: 0.1.0.0
synopsis: OpenTelemetry tracing for hasql
description:
Wraps the pqi adapter that hasql 2 connects through, so that every command
sent to Postgres becomes an OpenTelemetry client span carrying the SQL,
the row count and, on failure, the SQLSTATE. Spans are timed from the send
to the last result, including in pipeline mode. Parameter values and error
messages are never recorded.
.
See "Hasql.OpenTelemetry" for usage.
category: Database, Telemetry
homepage: https://github.com/kronor-io/hasql-opentelemetry
bug-reports: https://github.com/kronor-io/hasql-opentelemetry/issues
license: BSD-3-Clause
license-file: LICENSE
author: Kronor
maintainer: lorenzo@kronor.io
copyright: 2026 Kronor
build-type: Simple
tested-with: GHC ==9.12.4
extra-doc-files:
CHANGELOG.md
README.md
source-repository head
type: git
location: https://github.com/kronor-io/hasql-opentelemetry
common common
default-language: GHC2021
default-extensions:
BlockArguments
LambdaCase
OverloadedStrings
ghc-options:
-Wall -Wcompat -Widentities -Wincomplete-record-updates
-Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints
library
import: common
hs-source-dirs: src
exposed-modules: Hasql.OpenTelemetry
build-depends:
, base >=4.18 && <5
, bytestring >=0.11 && <0.13
, containers >=0.6 && <0.9
, hs-opentelemetry-api ^>=1.0
, pqi ^>=1.1
, text >=2.0 && <2.2
, unordered-containers >=0.2.14 && <0.3
test-suite hasql-opentelemetry-test
import: common
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Main.hs
ghc-options: -threaded
build-depends:
, base
, hasql ^>=2.0
, hasql-opentelemetry
, hs-opentelemetry-api
, hs-opentelemetry-exporter-in-memory ^>=1.0
, hspec >=2.10 && <2.12
, pqi
, pqi-ffi ^>=1.0
, pqi-native ^>=1.0
, text