All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added support for Spring Boot 3.4.
- Added support for Spring Boot 3.3.
TwTeam.ACCOUNT_DETAILS_SERVICE
toTwTeam.CONTACTS
- the formation and ownership of team has changed in the process, refer to CODEOWNERS in GitHub for respective services.TwTeam.QUOTE_SERVICE
toTwTeam.SEND_CORE
, to unify team's ownership under its former and current team names.
TwTeam.SPEED
- the team no longer exists, CODEOWNERS files for the services it used to own would reflect where they now belong.
- Added support for Spring Boot 3.2.
- Updated dependencies.
- When using
twContext.put()
it now always stores the new value to attributes. It no longer checks if old value is not equal to the new one. This is needed to support use cases where the objects might be equal (like an empty map), but we want to create a new separate object anyway in the sub contexts. - As a result also change the
TwContextAttributeChangeListener
toTwContextAttributePutListener
.TwContextAttributePutListener
is now always called when thetwContext.put()
is called regardless if the value changed or not. This also enables wider use of the interface.
com.google.guava:guava
to32.1.2-jre
to fix CVE-2023-2976- Build against Spring Boot 3.0.7 --> 3.0.9
- Build against Spring Boot 2.7.13 --> 2.7.14
- Support for Spring Boot 3.1
- Build against Spring Boot 3.0.6 --> 3.0.7
- Build against Spring Boot 2.7.11 --> 2.7.13
- Build against Spring Boot 2.6.14 --> 2.6.15
- Added matrix build
- POM is now correctly built without
dependencyManagement
section.
- NewRelic remnants.
- @PostConstruct annotations.
- Use new Spring Boot ^2.7 way of declaring auto-configurations so that
tw-context-starter
can be used with Spring Boot 3 applications.
- Deadline and Criticality are put into MDC. Especially, missing deadline makes debugging some timeout issues hard.
- Moving the minimum platform to JDK 11.
- Open sourcing it.
- Using a faster form for creating
java.time.Instant
-s. We are only interested in millisecond precision and getting nanoseconds seems to be relatively expensive operation.
- NoOpTimeoutCustomizer for unit tests.
- A method to
TimeoutCustomizer
for cases where creating a Duration is considered too expensive.
- Restored deprecated
DefaultUnitOfWorkManager(MeterRegistry meterRegistry)
constructor to support some older libs.
- Small optimization around
TwContext
interceptors traversal.
- Restored backward compatibility in
TwContextMetricsTemplate
.
- Small CPU optimizations
- MeterCache to circumvent Micrometer inefficiencies.
MdcRestoringEntryPointInterceptor
for automatically cleaning MDC when exiting from the outmost entrypoint.
UnitOfWorkManager.createEntryPoint
has method withowner
attribute.TwContext.isEntrypoint()
tells if we are running under some entrypoint.
- Upgraded external libs.
- Restored
com.transferwise.common.context.TwContextMetricsTemplate.registerDeadlineExceeded
old version for backward compatibility reasons.
- Added owner tag for deadline metrics.
- Added properties applying to all timeouts. The idea, is that timeout values set for production can often be too low for development environments,
but asking engineers to always set timeouts with if statements ("if develenv then..."), in every single client, is not feasible. So instead, we
define properties
tw-context.core.timeoutMultiplier
andtw-context.core.timeoutAdditive
, which can be set globally, lets say as environment variables in custom environment. Also, an application is able to overwriteTimeoutCustomizer
bean for more granual control.
- Removed 0.3.2 from repositories as minor version needed to be changed instead of patch one.
- Using a separate TwContextClockHolder to be able to mock time in local tests.
-
TwContext now has entry point "Owner" as first class citizen, together with name and group.
-
tw-context-ownership-starter module. A library to automatically set entry point owner, based on configuration or "handler" classes.
- Deadline exception also contains information how long has passed from the start of the unit of work. In servlet case it means from beginning of the request.
- Deadline can be now extended. Even when this would be very bad practice, it is sometimes needed during migration and optimization process.
For example in Payout Service markCompleted
endpoint was timing out, but the transaction behind it finished. When we introduced deadline
interceptors, there, Ops were not able to complete those batches anymore, because the transactions were interrupted with DeadlineExceededException.
When deadline is exceeded, a special counter tw.context.deadline.extended
is increased, to check quality of the service.