Annotation Interface AutoConfigureObservability


@Target(TYPE) @Retention(RUNTIME) @Documented @Inherited @ImportAutoConfiguration public @interface AutoConfigureObservability
Annotation that can be applied to a test class to enable auto-configuration for observability.

If this annotation is applied to a sliced test, an in-memory MeterRegistry, a no-op Tracer and an ObservationRegistry are added to the application context.

Since:
3.0.0
Author:
Moritz Halbritter
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether metrics should be reported to external systems in the test.
    boolean
    Whether traces should be reported to external systems in the test.
  • Element Details

    • metrics

      boolean metrics
      Whether metrics should be reported to external systems in the test.
      Returns:
      whether metrics should be reported to external systems in the test
      Default:
      true
    • tracing

      boolean tracing
      Whether traces should be reported to external systems in the test.
      Returns:
      whether traces should be reported to external systems in the test
      Default:
      true