hs-opentelemetry-vendor-honeycomb: Optional OpenTelemetry integration for Honeycomb

[ bsd3, library, opentelemetry ] [ 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.1, 0.0.1.2, 1.0.0.0
Change log ChangeLog.md
Dependencies base (>=4.7 && <5), bytestring, honeycomb (>=0.1.0.1), hs-opentelemetry-api (>=1.0 && <1.1), mtl, text, time, transformers, unordered-containers, uri-bytestring [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:32Z
Category OpenTelemetry
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 Stackage:0.0.1.2
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 240 total (6 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-vendor-honeycomb-1.0.0.0

[back to package description]

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