BSD-3-Clause licensed by Ian Duncan, Jade Lovelace
Maintained by [email protected]
This version can be pinned in stack with:hs-opentelemetry-vendor-honeycomb-1.0.0.0@sha256:0d76f6c0232f73b3c3fde905076d03383a9bbe22c3419eef9d7b9ee560fd0164,2523

Module documentation for 1.0.0.0

Honeycomb Utilities

hs-opentelemetry-vendor-honeycomb

Utilities for deriving Honeycomb-specific constructs from OpenTelemetry instrumentation.

Usage

For example, the following will print the URL for the Honeycomb trace visualization associated with the current span:

do
  config <- getConfigPartsFromEnv >>= \case
    Nothing -> throwIO $ userError "invalid Honeycomb config"
    Just (teamWriteKey, datasetName) -> pure $ HoneyComb.config teamWriteKey datasetName
  provider <- getGlobalTracerProvider
  target <- resolveHoneycombTarget provider config

  timestamp <- Data.Time.Clock.getCurrentTime

  context <- OpenTelemetry.Context.ThreadLocal.lookupContext >>= \case
    Nothing -> throwIO $ userError "no trace context available"
    Just context -> pure context
  spanContext <- OpenTelemetry.Context.lookupSpan context >>= \case
    Nothing -> throwIO $ userError "no span in trace context"
    Just span -> getSpanContext span

  print $ makeDirectTraceLink target timestamp spanContext.traceId

Changes

Changelog for hs-opentelemetry-vendor-honeycomb

1.0.0.0 - 2026-05-29

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

0.0.1.2

  • Support newer dependencies

0.0.1.0

Initial release