GH-5 - Upgrade observability module to Micrometer.

Re-enable observability module after a migration from Spring Cloud Sleuth to Micrometer. Bind the application of the observability instrumentation to the management.tracing.enabled flag.
This commit is contained in:
Oliver Drotbohm
2022-07-08 09:30:30 +02:00
parent 194c5ade74
commit 911ba08478
10 changed files with 64 additions and 42 deletions

View File

@@ -15,15 +15,26 @@
*/
package example;
import static org.assertj.core.api.Assertions.*;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.actuate.observability.AutoConfigureObservability;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationContext;
import org.springframework.modulith.observability.ModuleEventListener;
/**
* @author Oliver Drotbohm
*/
@SpringBootTest
@AutoConfigureObservability
class ExampleApplicationIntegrationTests {
@Autowired ApplicationContext context;
@Test
void bootstrapsSuccessfully() {}
void bootstrapsSuccessfully() {
assertThat(context.getBean(ModuleEventListener.class)).isNotNull();
}
}