Time for Time
Introduce Time timestamp type
We have a common and pervasive requirement for timestamps. We have been sourcing this simple type from another package but have now relocated this code here to core-data and added a new compatibility typeclass Instant similar to the Textual, Binary etc in this family of libraries.
Improve exception handling
Re-exporting the usual exception handling functions was working care of the MonadCatch, MonadThrow, and MonadMask instances for the Program τ monad but was proving awkward for developers new to Haskell. Since the pattern we promote is to run pure code in Either err and then when reaching the I/O layer to continue or throw, users of this library are now offered catch
, throw
, etc. specialized to the Program τ monad.
As the original re-exports have been removed from Core.System this change has resulted in a major API bump to 0.5.0
Enhance telemetry capabilities and performance.
Significant Telemetry improvements, notably adding compression and chunking so we don't overwhelm the peer observability platform when sending to them. Add support for the traceparent:
header so that traces can continue when requests cross service boundaries.
- Use traceparent header to set parent trace and span by @istathar in #113
- Adjust logging of telemetry by @istathar in #117
- Prohibit empty metric field names by @istathar in #118
- Work toward allowing override of Span identifier by @TheWizardTower in #126
- Limit the rate which telemetry is read from queue by @istathar in #134
- Compress events before sending to Honeycomb by @carlosdagos in #135
Improvements to telemetry being sent by webserver layer:
- Only send query string value if present by @istathar in #129
- Don't clear metrics before running handler by @istathar in #131
- Add context to prepareRoutes by @jack-davies in #121
- When sending errors include HTTP status code by @istathar in #123
- Refine HTTP request fields in telemetry by @istathar in #128
Other Changes
- Fix argument order by @istathar in #120
- Fix Haddock links by @istathar in #122
- Fix a typo by @TheWizardTower in #124
Full Changelog: core-program-0.4.5.3...core-program-0.5.0.2