eventuo11y-0.1.0.0: An event-oriented observability library
CopyrightCopyright 2022 Shea Levy.
LicenseApache-2.0
Maintainershea@shealevy.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

Observe.Event.Render.JSON

Description

Instrumentors will need to provide instances of RenderSelectorJSON and RenderFieldJSON for their domain-specific types to use their Events with JSON-consuming EventBackends.

Synopsis

Documentation

type RenderSelectorJSON sel = forall f. sel f -> (Key, RenderFieldJSON f) Source #

A function to render a given selector, its fields, as JSON.

The Key is the event name/category.

type RenderFieldJSON field = field -> (Key, Value) Source #

A function to render a given field as JSON.

The Key is a field name, the Value is an arbitrary rendering of the field value (if any).

Rendering structured exceptions

type RenderExJSON stex = stex -> Value Source #

A function to render a given structured exception to JSON.

SomeJSONException

renderJSONException :: RenderExJSON SomeJSONException Source #

Render a SomeJSONException to JSON.

It is not necessary to use SomeJSONException for the base of your structured exceptions in a JSON backend, so long as you provide a RenderExJSON for your base exception type.

data SomeJSONException Source #

A possible base type for structured exceptions renderable to JSON.

It is not necessary to use SomeJSONException for the base of your structured exceptions in a JSON backend, so long as you provide a RenderExJSON for your base exception type.

Constructors

forall e.(Exception e, ToJSON e) => SomeJSONException e 

jsonExceptionToException :: (Exception e, ToJSON e) => e -> SomeException Source #

Used to create sub-classes of SomeJSONException.

Observe.Event.Dynamic support