hs-opentelemetry-instrumentation-hspec-0.0.1.1
Safe HaskellSafe-Inferred
LanguageHaskell2010

OpenTelemetry.Instrumentation.Hspec

Description

Instrumentation for Hspec test suites

Synopsis

Documentation

wrapSpec :: MonadIO m => m (SpecWith a -> SpecWith a) Source #

Creates a wrapper function that you can pass a spec into.

This function will wrap each it test case with a span with the name of the test case.

The context in which this is called determines the parent span of all of the spec items.

wrapExampleInSpan :: Tracer -> Context -> Item a -> Item a Source #

Wraps one example in a span parented by the specified context, and ensures the thread running the spec item will have a context available.

instrumentSpec :: Tracer -> Context -> SpecWith a -> SpecWith a Source #

Instrument each test case. Each describe and friends will add a span, and the final test will be in a span described by it.