hs-opentelemetry-instrumentation-hspec: OpenTelemetry instrumentation for Hspec test suites

[ bsd3, library, opentelemetry, testing, unclassified ] [ Propose Tags ] [ Report a vulnerability ]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.0.1.0, 0.0.1.1, 0.0.1.2, 0.0.1.3, 1.0.0.0
Change log ChangeLog.md
Dependencies base (>=4.7 && <5), hs-opentelemetry-api (>=1.0 && <1.1), hspec-core (>=2.9.4), mtl, text [details]
License BSD-3-Clause
Copyright 2024 Ian Duncan, Mercury Technologies
Author Ian Duncan, Jade Lovelace
Maintainer ian@iankduncan.com
Uploaded by IanDuncan at 2026-05-29T14:41:36Z
Category OpenTelemetry, Testing
Home page https://github.com/iand675/hs-opentelemetry#readme
Bug tracker https://github.com/iand675/hs-opentelemetry/issues
Source repo head: git clone https://github.com/iand675/hs-opentelemetry
Distributions
Downloads 368 total (18 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for hs-opentelemetry-instrumentation-hspec-1.0.0.0

[back to package description]

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.