packages feed

hs-opentelemetry-exporter-otlp 0.1.0.0 → 0.1.0.1

raw patch · 3 files changed

+29/−8 lines, 3 filesdep +hs-opentelemetry-propagator-w3cdep ~hs-opentelemetry-api

Dependencies added: hs-opentelemetry-propagator-w3c

Dependency ranges changed: hs-opentelemetry-api

Files

ChangeLog.md view
@@ -1,5 +1,22 @@ # Changelog for hs-opentelemetry-exporter-otlp +## Unreleased++## 0.1.0.1++### Added+- TraceState support in OTLP span export+- Proper encoding of traceState field in OTLP spans and span links+- Full traceState preservation without HTTP header constraints++### Changed+- Span export now includes traceState information from span context+- Span links export now includes traceState information from link context+- Switched to `encodeTraceStateFull` to preserve all traceState entries in binary format++### Dependencies+- Added `hs-opentelemetry-propagator-w3c` dependency for traceState encoding+ ## 0.1.0.0  - Export dropped span, link, event, and attribute counts
hs-opentelemetry-exporter-otlp.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.36.0.+-- This file has been generated from package.yaml by hpack version 0.37.0. -- -- see: https://github.com/sol/hpack  name:           hs-opentelemetry-exporter-otlp-version:        0.1.0.0+version:        0.1.0.1 synopsis:       OpenTelemetry exporter supporting the standard OTLP protocol description:    Please see the README on GitHub at <https://github.com/iand675/hs-opentelemetry/tree/main/exporters/otlp#readme> category:       OpenTelemetry, Telemetry, Monitoring, Observability, Metrics@@ -39,8 +39,9 @@       base >=4.7 && <5     , bytestring     , case-insensitive-    , hs-opentelemetry-api ==0.2.*+    , hs-opentelemetry-api ==0.3.*     , hs-opentelemetry-otlp ==0.1.*+    , hs-opentelemetry-propagator-w3c     , http-client     , http-conduit     , http-types
src/OpenTelemetry/Exporter/OTLP/Span.hs view
@@ -74,6 +74,7 @@ import qualified OpenTelemetry.Baggage as Baggage import OpenTelemetry.Environment import OpenTelemetry.Exporter.Span+import OpenTelemetry.Propagator.W3CTraceContext (encodeTraceStateFull) import OpenTelemetry.Resource import OpenTelemetry.Trace.Core (timestampNanoseconds) import qualified OpenTelemetry.Trace.Core as OT@@ -318,7 +319,7 @@     . fmap attributeToKeyValue     . H.toList     . snd-    . getAttributes+    . ((,) <$> getCount <*> getAttributeMap)   where     primAttributeToAnyValue = \case       TextAttribute t -> defMessage & Common_Fields.stringValue .~ t@@ -406,7 +407,7 @@       & Trace_Fields.spanId         .~ spanIdBytes (OT.spanId $ OT.spanContext completedSpan)       & Trace_Fields.traceState-        .~ "" -- TODO (_ $ OT.traceState $ OT.spanContext completedSpan)+        .~ T.decodeUtf8 (encodeTraceStateFull $ OT.traceState $ OT.spanContext completedSpan)       & Trace_Fields.name         .~ OT.spanName completedSpan       & Trace_Fields.kind@@ -424,7 +425,7 @@       & Trace_Fields.vec'attributes         .~ attributesToProto (OT.spanAttributes completedSpan)       & Trace_Fields.droppedAttributesCount-        .~ fromIntegral (fst (getAttributes $ OT.spanAttributes completedSpan))+        .~ fromIntegral (getCount $ OT.spanAttributes completedSpan)       & Trace_Fields.vec'events         .~ fmap makeEvent (appendOnlyBoundedCollectionValues $ OT.spanEvents completedSpan)       & Trace_Fields.droppedEventsCount@@ -463,7 +464,7 @@     & Trace_Fields.vec'attributes       .~ attributesToProto (OT.eventAttributes e)     & Trace_Fields.droppedAttributesCount-      .~ fromIntegral (fst (getAttributes $ OT.eventAttributes e))+      .~ fromIntegral (getCount $ OT.eventAttributes e)   makeLink :: OT.Link -> Span'Link@@ -473,7 +474,9 @@       .~ traceIdBytes (OT.traceId $ OT.frozenLinkContext l)     & Trace_Fields.spanId       .~ spanIdBytes (OT.spanId $ OT.frozenLinkContext l)+    & Trace_Fields.traceState+      .~ T.decodeUtf8 (encodeTraceStateFull $ OT.traceState $ OT.frozenLinkContext l)     & Trace_Fields.vec'attributes       .~ attributesToProto (OT.frozenLinkAttributes l)     & Trace_Fields.droppedAttributesCount-      .~ fromIntegral (fst (getAttributes $ OT.frozenLinkAttributes l))+      .~ fromIntegral (getCount $ OT.frozenLinkAttributes l)