| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Platform.Analytics.Internal
Description
Internal entry point for emitting analytics events from Task code.
This module is intentionally `.Internal`. It is NOT re-exported from
the prelude's public Platform module. Higher layers (NoRedInk's
track) wrap this and own the user-facing API; downstream
code that imports Internal directly is bypassing
the closed event dictionary and should be flagged in review.
Synopsis
- trackEvent :: ToJSON e => e -> Task err ()
- data AnalyticsEventDetails
Documentation
trackEvent :: ToJSON e => e -> Task err () Source #
Send an analytics event. Opens a child tracing span named
analytics.track, attaches the JSON payload as the span's details,
and invokes the LogHandler's analytics callback. The callback runs
as a Task with the current LogHandler, so any errors it logs flow
through the normal observability pipeline.
data AnalyticsEventDetails Source #
A TracingSpanDetails wrapper around the analytics event payload, so
that the JSON we send to the analytics backend is also attached to the
analytics.track span and visible in the existing observability
reporters.
Instances
| ToJSON AnalyticsEventDetails Source # | |
Defined in Platform.Analytics.Internal Methods toJSON :: AnalyticsEventDetails -> Value # toEncoding :: AnalyticsEventDetails -> Encoding # toJSONList :: [AnalyticsEventDetails] -> Value # toEncodingList :: [AnalyticsEventDetails] -> Encoding # omitField :: AnalyticsEventDetails -> Bool # | |
| TracingSpanDetails AnalyticsEventDetails Source # | |