| Copyright | Copyright 2022 Shea Levy. | 
|---|---|
| License | Apache-2.0 | 
| Maintainer | shea@shealevy.com | 
| Safe Haskell | Safe-Inferred | 
| Language | Haskell2010 | 
Observe.Event.Dynamic
Contents
Description
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 Events have DynamicField field types.
Individual DynamicEventSelectors 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".
Constructors
| DynamicEventSelector :: !Text -> DynamicEventSelector DynamicField | 
Instances
| f ~ DynamicField => IsString (DynamicEventSelector f) Source # | |
| Defined in Observe.Event.Dynamic Methods fromString :: String -> DynamicEventSelector f # | |
data DynamicField Source #
A simple type usable as an Event field type.
Individual DynamicFields are typically constructed via
 the IsString instance, using ToJSON for the value,
 e.g. addField ev $ "foo" x will add DynamicField "foo" (toJSON x)
 as a field to ev.
Constructors
| DynamicField | |
Instances
| ToJSON x => IsString (x -> DynamicField) Source # | Treat a string as a function to a  | 
| Defined in Observe.Event.Dynamic Methods fromString :: String -> x -> DynamicField # | |
Shorthand types
type DynamicEventBackend m r = EventBackend m r DynamicEventSelector Source #
Shorthand for an EventBackend using DynamicEventSelectors.
type DynamicEvent m r = Event m r DynamicEventSelector DynamicField Source #
Shorthand for an Event using DynamicFields.