Changelog for freckle-app-1.24.0.1
Unreleased
v1.24.0.1
- Support
autodocodec-openapi3version0.3
v1.24.0.0
- Update
HttpCache.setto accept TTL (and use it in memcached implementation)
v1.23.3.0
- Add to
Freckle.App.Test:withFailureDetail - Add to
Freckle.App.Test.Yesod:statusIs2xx
v1.23.2.0
- Add to
Freckle.App.Test:expectJust,expectRight, andexpect
v1.23.1.0
- Add
pooledMapConcurrentlyet-al toFreckle.App.Async
v1.23.0.1
Add more thread context preserving combinators to Freckle.App.Async
v1.23.0.0
Removes Freckle.App.HttpSpec which had been included by mistake.
v1.22.0.0
Freckle.App.Stats has moved to a separate package freckle-stats.
When migrating to freckle-stats, note that the instance
instance HasStatsClient site => HasStatsClient (HandlerData child site) where
statsClientL = envL . siteL . statsClientL
has been removed. If you are using Yesod, you may need to copy this definition into your own code.
Freckle.App.Ecs has moved to a separate package freckle-ecs.
v1.21.0.0
The following have moved from Freckle.App.Database to a new package, persistent-sql-lifted:
MonadSqlTx (..)HasSqlBackend (..)MonadSqlBackend (..)liftSql
The definitions in freckle-app have been replaced with reƫxports,
so no code needs to change for users, except that a dependency on
the persistent-sql-lifted package is now required.
v1.20.3.0
Add Freckle.App.TextualEnum
v1.20.2.1
Adds an OpenTelemetry span called "runSqlPool" within each "runDB" span.
runDBcovers the entire action, from the time it requests a connection from the pool to the time it returns the connection to the pool.- The new
runSqlPoolspan covers the actions taken while holding a connection. This span doesn't start until a connection is obtained.
This makes the trace more explicitly reflect situations where a thread was blocked by an exhausted connection pool.
v1.20.2.0
- Add
Freckle.App.Test.Hspec.AnnotatedException.annotateHUnitFailure - Improve quality of exceptions rethrown by
unwrapAnnotatedHUnitFailure. Previously anyAnnotations were discarded. Now they are incorporated into theHUnitFailure, including pretty-printing of a call stack if present.
v1.20.1.1
Improve quality of error message output from getJsonBody and getCsvBody
in Freckle.App.Test.Yesod.
v1.20.1.1
In Freckle.App.Test.Yesod, exceptions thrown by getRawBody, getJsonBody,
and getCsvBody are now HUnitFailure (what you would normally expect when a
test assertion fails) rather than IOException.
v1.20.1.0
Modules moving between packages:
Freckle.App.Preludehas moved to thefreckle-preludepackageFreckle.App.Exception(.*)has moved to thefreckle-exceptionpackage- All moved modules are re-exported from
freckle-app.
Added Freckle.App.Test.Hspec.AnnotatedException (unwrapAnnotatedHUnitFailure).
It is recommended that all hspec test suites for packages that use freckle-prelude
add this spec hook.
v1.20.0.1
- Upgrade
Blammoto 2.1
v1.20.0.0
Changes affecting users:
- Removed
Freckle.App.Memcached(.*); these modules have moved into thefreckle-memcachedpackage.
Changes that do not have to affect users:
- Modules
Freckle.App(.Test?).Http(.*)are now re-exports from thefreckle-httppackage. - Modules
Freckle.App.OpenTelementry(.*)are now re-exports from thefreckle-otelpackage. - Module
Freckle.App.Dotenvis now a re-export from thefreckle-envpackage.
v1.19.0.0
- Removed
Freckle.App.Kafka(.*); this is now available from thefreckle-kafkapackage. If you are usingfreckle-appbut not Kafka, you no longer need to also install the native Kafka library to buildfreckle-app. Please see opening the change log entry infreckle-kafkafor notes on how to upgrade. Freckle.App.Envis now a re-export from the newfreckle-envpackage. Its API has not changed.
v1.18.2.0
- Add
Freckle.App.Test.Properties.PersistValue(prop_roundTripPersistValue) - Support and require
Blammo>= 2to accommodate the extraction of theBlammo-waipackage
v1.18.1.0
- Add
Freckle.App.Http (setRequestMethod) - Add
Freckle.App.Async(foldConcurrently,ThreadContext (..),getThreadContext,withThreadContext) - Bugfix: Utilities in
Freckle.App.Asyncnow preserve OpenTelemetry context (previously were only passing along Blammo logging context)
v1.18.0.0
- Drop deprecated hs-opentelemetry-datadog functionality
- Remove AWS XRay module
v1.17.1.0
- Support (and require)
hw-kafka-client>= 5
v1.17.0.0
- Require Blammo 1.2
- Remove
LoggingTfrom the definitions ofAppTandAppExample - Users are advised to use the new
withLoggerutility available as of Blammo 1.2 to intialize an application's logger. In places other than the top level of an application, most uses ofrunLoggerLoggingTshould be replaced withrunWithLoggerorrunAppT. - Add instance
MonadTrans AppT
v1.16.0.0
-
Add tracing to HTTP requests made within
AppTThis is a potentially breaking change for users of
AppT appbecause it now requiresHasTracer app. This instance most likely already exists, since it's required to userunDBtoo.
v1.15.5.0
- Add
Freckle.App.OpenTelemetry.Contextwith helpers for propagating trace context across services.
v1.15.4.0
-
Add
addThreadContextFromTracingand deprecate existing middlewareMigrating away from the deprecated middleware would look like:
- import Network.Wai.Middleware.OpenTelemetry (newOpenTelemetryWaiMiddleware) + import Freckle.App.Wai (addThreadContextFromTracing) + import OpenTelemetry.Instrumentation.Wai (newOpenTelemetryWaiMiddleware) traceMiddleware <- newOpenTelemetryWaiMiddleware run 3000 . traceMiddleware + . addThreadContextFromTracing . ... $ app -
Add
withTraceContextand deprecate existing datadog-specific functions
v1.15.3.0
- Add
Freckle.App.OpenTelemetry.addCurrentSpanAttributes
v1.15.2.0
- Add
FaktoryProducerPoolandHasFaktoryProducerPoolfor pooling connections to Faktory
v1.15.1.0
- Add
Freckle.App.Http.Cache - Add
disableRequestDecompress
v1.15.0.1
- Set
service.namewhen tracing Database, Memcached, and Kafka functions.
v1.15.0.0
-
Support
aeson-2.2 -
Support
http-client-0.7.16 -
Drop support for GHC < 9.2, add CI for GHC 9.8
BREAKING. Things may still compile, but we've stopped testing with resolvers lower than
lts-20. Accordingly,CPPbranches supporting dependencies from below that resolver were also removed, and the following minimum bounds were raised:aeson > 2.0dotenv > 0.10envparse > 0.5http-link-header >1.2mecache > 0.3.0template-haskell > 2.18.0
-
Introduce
MonadHttpBREAKING.
Freckle.App.Httpnow uses a customMonadHttpclass instead ofMonadIO. This allows customizing the behavior of HTTP centrally for your entire application stack, including stubbing HTTP requests in tests.An
IOinstance exists, so users can either add:instance MonadHttp AppM where httpLbs = liftIO httpLbsOr replace call-sites,
- resp <- httpLbs req + resp <- liftIO $ httpLbs reqTo maintain behavior across this upgrade.
v1.14.0.0
- Reverted changes for explicit offset committing in
runConsumerback to the auto-commit strategy [breaking]
v1.13.0.1
- Fixed issue with
runConsumersynchronously committing offsets after every event
v1.13.0.0
-
Handle committing offsets more intelligently in
Kafka.Consumer[breaking]The autocommit configuration and behavior was removed. Instead, we store and commit offsets explicitly such that at-least-once processing is ensured and duplicate processing (during deploy scaling) is minimized.
-
Add
Freckle.App.Json.Emptywith theEmptytype. -
Expose data constructors for
Freckle.App.Memcached.Client.MemcachedClient.
v1.12.0.1
- Change how
active_pool_connectionsmetric is calculated. - Add
queries_enqueued_and_processingmetric.
v1.12.0.0
- Support
bugsnag-1.1which now handlesAnnotatedExceptionwell, so we've now removed someBeforeNotifyhandlers from this package that are no longer needed. - Removed
Freckle.App.Bugsnag.MetaData.metaDataAnnotationsBeforeNotify; what it did is now redundant to the default behavior of thebugsnaglibrary. - Removed module
Freckle.App.Bugsnag.CallStack; what it provided is now redundant to the default behavior of thebugsnaglibrary.
v1.11.0.0
- Add
MonadUnliftIOsuperclass toMonadSqlBackend - Use
checkpointCallStackinliftSqlto help grab more stack frames
v1.10.8.0
- Reduce logged caching errors to
WARNand adderror.stackto them - Add
Freckle.App.ExceptionwithannotatedExceptionMessagehelpers - Use
withFrozenCallStackon more exception utilities to reduce noise in call stacks
v1.10.7.0
-
Any Bugsnag
MetaDatain anAnnotatedException's annotations will now be copied into the Bugsnag event. This means you can use thecheckpointfunction to add context to an action, and this information will be visible in the bug report for any unhandled exception thrown from that action.e.g.
checkpoint (metaData "tab name" ["key" .= _value]) $ _action
v1.10.6.0
- The Bugsnag settings created by
envParseBugsnagSettingsnow has aBeforeNotifythat appropriately handlesAnnotatedException. Its special handling ofSqlErrorandHttpExceptionnow works in the presence of annotations. If aCallStackannotation is present, that will be used as the stacktrace for reported events.
v1.10.5.1
- Fix decoding bug when caching non-UTF-8 values
v1.10.5.0
-
Add
Freckle.App.Exception...modules with exception utilities based on theannotated-exceptionpackage. -
The Prelude module is expanded to reexport from
Freckle.App.Exception.MonadUnliftIOthe following:throwM,throwString,fromJustNoteM,catch,catchJust,catches,try,tryJust,impossible,ExceptionHandler,Exception,SomeException. These should be used in place of their relevant counterparts from packagesbase,exceptions,safe-exceptions, orunliftio. -
Add
Freckle.App.Random
v1.10.4.0
- Use JUnit formatting for test output when
JUNIT_ENABLEDenvironment variable is set. - Use environment variables to configure JUnit; always prefix
source paths with test suite
nameand output tests to/tmp/junit. - Remove using
CIRCLECIenvironment variable.
v1.10.3.0
- Add classes
MonadSqlBackendandMonadSqlTxfor being quite nonspecific about the context in which you interact with a SQL database.
v1.10.2.0
- Add module
Freckle.App.Memcached.MD5 - Add
fiveMinuteTTLto moduleFreckle.App.Memcached.CacheTTL - Add
cachingAsCBORto moduleFreckle.App.Memcached
v1.10.1.1
- Use
withTraceIdContextinFreckle.App.Kafka.Consumer.runConsumer, ensuring all logging contains thetrace_idin context. - Add
getCurrentTraceIdAsDatadogandwithTraceIdContexttoFreckle.App.OpenTelemetry.
v1.10.0.0
-
Full support for OpenTelemetry tracing, use it instead of XRay in
runDBThis replaces our bespoke, XRay-based
MonadTracerclass to be that ofhs-opentelemetry.This meansFreckle.App.Database.runDBnow traces using OpenTelemetry instead of XRay. A compilation error will indicate a missingHasTracerinstance, which you should implement based on theFreckle.App.OpenTelemetrymodule documentation.Clients who wish to remain on XRay can still upgrade, but must adjust their imports so they use
Freckle.App.Database.XRay, notFreckle.App.Database.
v1.9.5.1
- Fixed mistake in
Freckle.App.Test.Yesod.getResponseproducing nontermination
v1.9.5.0
- Add module
Freckle.App.Test.Yesod
v1.9.4.0
- Add
Freckle.App.Async(primarily) for correctly managing thread context when spawning new threads.
v1.9.3.0
- Auto-commit offset when consuming Kafka events.
v1.9.2.1
- Fixed segfault bug in
Freckle.App.Kafka.Consumer.
v1.9.2.0
- Add
Freckle.App.Kafka.Consumerfor consuming Kafka events. - Move producer to
Freckle.App.Kafka.Producer. - Re-export both modules in
Freckle.App.Kafka.
v1.9.1.1
- Add
KafkaProducerPoolConfigfor controlling Kafka producer pool parameters
v1.9.1.0
- Add
Freckle.App.Kafkafor producing kafka events
v1.9.0.3
- Use option
PGSCHEMAenvironment variable to set schema at connection start.
v1.9.0.2
- Fix for not setting ECS Metadata tags in
StatsClient
v1.9.0.1
-
Report errors getting ECS Metadata during
withStatsClientinitializationThis does change the type of
getEcsMetadata, but we consider it a patch-level bump because that module is very unlikely to be used directly.
v1.9.0.0
- Refactor
Freckle.App.Waiinterface - Add
addThreadContextFromStatsTags - Replace
HasXRayVaultDatawithMonadTracer - Introduce
AppT
v1.8.1.0
- Add
runDBSimplefor use cases where instrumentation is not valuable.
v1.8.0.0
- Fix bug: gauges not being published.
- Add HasVaultData type class to remove the dependency on Yesod's MonadHandler
v1.7.1.0
- Add Incremental CSV parsing
v1.7.0.0
-
Add XRay and EKG support to freckle-app's runDB.
This involves an breaking change in
runDB's constraints, thus the major version bump.
v1.6.0.3
-
Revert regrouping of
SqlErrorbyurlConsider
/foos/1vs/foos/2: grouping naively byurlmakes these two errors when we wanted them to be one. This can't be solved without knowledge of the routing system, so we can't do it from within this library as-is. Therefore, we've reverted the feature for now.
v1.6.0.2
- Strip query string from URLs used to group timeout exceptions in Bugsnag.
v1.6.0.1
- The built-in Bugsnag
BeforeNotifywill further groupSqlErrors that are timeouts (57014) by Request URL (when request info is present in theEvent)
v1.6.0.0
-
Remove
AppVersionThis also removes the
test-gitflag.This was over-engineered, in our opinion. If you're making use of the conventional
DD_variables that theStatsmodule expects, you should be able to:- Replace any
appVersion :: AppVersionwithappVersion :: Text - Replace
appVersion <- getAppVersionwithappVersion <- maybe "unknown" pack <$> lookupEnv "DD_VERSION" - Replace
avName appVersionwithappVersion - Remove uses of
avCreatedAt
- Replace any
-
Add
Freckle.App.Dotenv, wrappingdotenvAnd move
Freckle.App.Test.withAppto use it instead ofLoadEnv. This is behavior-neutral except:-
We no longer load
.envafter.env.test, we only load.env.testMissing variables should generate errors prompting you to copy values from the former to the latter as required.
-
We will verify the
.envfile against an.env.exampleif present.
-
-
Add
Freckle.App.Bugsnag.Metadata
v1.5.0.1
- Export
Freckle.App.Stats.tagsL
v1.5.0.1
- Relax lower bound on
primitive
v1.5.0.0
-
Remove
Freckle.App.Datadogmodules forFreckle.App.StatsequivalentsIt's not a drop-in, but the required changes should be mechanical:
- Instead of
HasDogStats{Client,Tags}, implement a singleHasStatsClient - Instead of
mkStatsClientusewithStatsClient(the new style ofrunApphad will enable that) - Use
taggedinstead of extra arguments to metric sends - Move to the new
Rts,Gauge, andMiddleware.Statsmodules
- Instead of
-
Change signature of
runAppandwithAppInstead of passing a loaded
App(or a function that loads anApp) torunAppandwithApp, you should now pass a function that takes a function and calls it on the loadedApp.This is necessary for apps that hold onto values that require cleanup, like
withStatsClient.-- This doesn't work loadApp :: IO App loadApp = do -- ... withStatsClient $ \appStatsClient -> do -- ??? -- This does loadApp :: (App -> IO a) -> IO a loadApp f = do -- ... withStatsClient $ \appStatsClient -> do f App { .. }The old form can be trivially converted to the new form like so,
loadApp :: (App -> IO a) -> IO a loadApp f = f =<< loadApp' loadApp' :: IO App loadApp' = -- old code -
Add functions that check properties that we like to commonly test.
v1.4.0.0
-
Remove
runCapturedLoggingTWe can use
Blammo.Logging.Logger.newTestLoggerinstead. SeeMemcachedSpecas an example. -
Compatibility down to LTS 12.26 / GHC 8.4
v1.3.0.0
- Adjust
Freckle.App.Testinterface- Remove
runAppTest - Add
appExamplefor making a expectation concretelyAppExample - Add
expectationFailure, andpending(With)helpers inMonadIO
- Remove
v1.2.0.2
Env.keptcompatibility with envparse-0.5
v1.2.0.1
-
Use
Env.keptwith parsing that occurs inmakePostgresPoolThis ensure all
PGvariables are kept in the environment after parsing, to again match pre-v1.1 behavior.If you would prefer not to keep these variables, parse them yourself (e.g. with
envParseDatabaseConf) and usemakePostgresPoolWith. -
Add
Freckle.App.Env.keptto re-define aParserso that all variables are kept after reading. Not doing this can break tests if you are re-parsing the environment for each example.Replace
Env.parse fwithEnv.parse f $ Env.keptto recover how this module behaved prior to v1.1.
v1.2.0.0
-
Remove
Freckle.App.Logging, integrate with blammo instead.This will require the following end-user changes:
-
Remove
HasLogginginstance and addHasLoggerThis will require storing a
Loggeron your runtimeApptype, instead of aLogLevel(et al) in your staticAppSettingstype. (Or move torunSimpleLoggingT.) -
Replace WAI middleware with Blammo integration
-
Replace Yesod functions with [Blammo integration][blammo-yesod]
And changes to environment variable values:
- If using
LOG_OUTPUT=std(out|err), useLOG_DESTINATION=std(out|err)(note thatstdoutis the default) - If using
LOG_OUTPUT=file, useLOG_DESTINATION=@fancy.log(yes, that's this option did) - If using
LOG_FORMAT=terminal, useLOG_FORMAT=tty(note that this is the defualt)
-
v1.1.0.0
-
Require
MonadLoggerIOinmakePostgresPool(and so respect that logging context from DB activities).Previous behavior can be recovered by using
runNoLoggingT makePostgresPool. -
Re-implement
FronRow.App.Envvia external library,envparseSome conversions will be required:
-
Reader ashould now beReader Error a -
Parser ashould now beParser Error a -
parseshould now beparse id -
var x X nonEmptyshould now bevar (x <=< nonempty) X memptyNote that
(str <=< nonempty)is redundant. -
var (f <$> g) X mshould now bef <$> var g X mNote that
defwill now need a value the same type asg, notf. -
switchandflagno longer acceptdef(the non-active value is an implicit default; the previous behavior was kind of surprising and ambiguous). -
handleEitherhas been removed. Users will have to parse a complete value and then further validate/throw externally. -
Previously, we always behaved as if
keepwas applied. Add that explicitly if you need that behavior.
-
v1.0.4.0
- Add
Freckle.App.Bugsnagfor Bugsnag logging in applications. - Increased default PG poolsize to 10.
v1.0.3.0
-
Add
Freckle.App.Memcachefor using memcached in Apps -
Add
Freckle.App.Scientistfor using scientist in Apps
v1.0.2.10
-
Support GHC 9.0 and 9.2
-
Change
Waifunction arguments for producingRouteNameandTraceIdto tagsTo maintain the same behavior, replace
makeLoggingMiddleware app getRouteName getTraceId ...With
makeLoggingMiddleware app getTags ... where getTags req = catMaybes [ ("route", ) <$> getRouteName req , ("trace_id", ) <$> getTraceId req ]And similar for
makeRequestMetricsMiddleware.
v1.0.2.9
- Add some common textual encoding functions to prelude
v1.0.2.8
- Don't allow
aeson-2.0
v1.0.2.7
- Remove explicit
--regionin IAM DB token call - Relax lower-bounds throughout
v1.0.2.6
- Add a looser lower-bound on
containers
v1.0.2.5
- Add a looser lower-bound on
bytestring - Add a looser lower-bound on
template-haskell
v1.0.2.4
- Add a looser lower-bound on
base
v1.0.2.3
- Add Freckle-specific prelude.
v1.0.2.2
- Target
hspec-junit-formatter-1.0.3.0(use1.1.0.0in development)
v1.0.2.1
- Add
denyFrameEmbeddingMiddlewarefor denying HTML frame embedding.
v1.0.2.0
- Add 'Freckle.App.Yesod.Route' to allow printing route names.
v1.0.1.0
- Added
Freckle.App.Datadog.Gaugefor client side stateful gauges. - Added
Freckle.App.Datadog.Rtsfor sending RTS statistics to DataDog.
v1.0.0.4
-
Support seconds or milliseconds in
PGSTATEMENTTIMEOUTNOTE: We consider this a non-breaking change because the environment variable interface is backwards-compatible. By normal Haskell rules, it would be major since it's changing the type of something exported.
-
Add
respondQueryCanceledYesod Middlewares -
Add
makeRequestMetricsMiddleware
v1.0.0.3
- Add
package.yamltoextra-source-files.
v1.0.0.2
- Extract tests that require
gitinto a new suite.
v1.0.0.1
- Ensure
releaseGitHub Action completes properly.
v1.0.0.0
First tagged release.