Copyright | Copyright 2022 Shea Levy. |
---|---|
License | Apache-2.0 |
Maintainer | shea@shealevy.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Instrumentors can use the types in this module if they don't want to define domain-specific types for the code they're instrumenting.
Synopsis
- data DynamicEventSelector f where
- data DynamicField = DynamicField {}
- type DynamicEventBackend m r = EventBackend m r DynamicEventSelector
- type DynamicEvent m r = Event m r DynamicEventSelector DynamicField
Documentation
data DynamicEventSelector f where Source #
A simple type usable as an EventBackend
selector.
All Event
s have DynamicField
field types.
Individual DynamicEventSelector
s are typically constructed
via the IsString
instance, e.g. withEvent backend "foo" go
will call go
with an Event m r DynamicEventSelector DynamicField
named "foo".
Instances
DefaultRenderSelectorJSON DynamicEventSelector Source # | |
f ~ DynamicField => IsString (DynamicEventSelector f) Source # | |
Defined in Observe.Event.Dynamic fromString :: String -> DynamicEventSelector f # |
data DynamicField Source #
A simple type usable as an Event
field type.
Individual DynamicField
s are typically constructed via
the RecordField
instance, using ToJSON
for the value,
e.g. addField ev $ "foo" ≔ x
will add DynamicField "foo" (toJSON x)
as a field to ev
.
Instances
DefaultRenderFieldJSON DynamicField Source # | |
ToJSON a => RecordField Text a DynamicField Source # | |
Defined in Observe.Event.Dynamic (≔) :: Text -> a -> DynamicField # |
Shorthand types
type DynamicEventBackend m r = EventBackend m r DynamicEventSelector Source #
Shorthand for an EventBackend
using DynamicEventSelector
s.
type DynamicEvent m r = Event m r DynamicEventSelector DynamicField Source #
Shorthand for an Event
using DynamicField
s.