Without this change we have no way to pass the ObservationRegistry
that is registered in the given test's ApplicationContext
as the one that should be used by the ObservationThreadLocalAccessor
.
With this change we introduce a TestExecutionListener
that will set an ObservationRegistry
registered in the test's ApplicationContext
for each test class and after each test class will restore the previously stored ObservationRegistry
instance.
Comment From: marcingrzejszczak
cc @rstoyanchev after upgrading the context propagation library I needed to update one class
Comment From: marcingrzejszczak
- superseded by #30658