hs-opentelemetry-instrumentation-hspec

OpenTelemetry instrumentation for Hspec test suites

https://github.com/iand675/hs-opentelemetry#readme

Stackage Nightly 2026-07-30:1.0.0.0
Latest on Hackage:1.0.0.0

See all snapshots hs-opentelemetry-instrumentation-hspec appears in

BSD-3-Clause licensed by Ian Duncan, Jade Lovelace
Maintained by [email protected]
This version can be pinned in stack with:hs-opentelemetry-instrumentation-hspec-1.0.0.0@sha256:6cdc87b83dea6a39af0b990f12ebcb5211198b8868d87022a47b58e9bd3d8bac,1773

Module documentation for 1.0.0.0

hs-opentelemetry-instrumentation-hspec

hs-opentelemetry-instrumentation-hspec

OpenTelemetry instrumentation for the Hspec test framework; it creates one span per test case inside the instrumented Spec tree.

Usage

do
  provider <- getGlobalTracerProvider
  let tracer = OpenTelemetry.Trace.makeTracer provider "my-test-suite" OpenTelemetry.Trace.tracerOptions
  context <- OpenTelemetry.Context.ThreadLocal.getContext

  hspec $ instrumentSpec tracer context $ do
    describe "Spec" do
      it "is instrumented with OpenTelemetry" do
        True `shouldBe` True

See examples/hspec for an instrumented test suite.

Changes

Changelog for hs-opentelemetry-instrumentation-hspec

1.0.0.0 - 2026-05-29

  • Promoted to 1.0.0.0 for the hs-opentelemetry 1.0 release.

0.0.1.3

  • Relax hs-opentelemetry-api bounds to support 0.3.x

0.0.1.2

  • Support newer dependencies

0.0.1.0

  • Initial release