Skip to content

Commit

Permalink
Fix ordering of instrumentation such that the metrics instrumentation…
Browse files Browse the repository at this point in the history
… always is added last.
  • Loading branch information
srinivasankavitha committed Feb 21, 2025
1 parent 4503d97 commit a1b1909
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.cache.CacheManager
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.core.PriorityOrdered
import org.springframework.core.annotation.Order
import java.util.Optional

/**
Expand All @@ -38,6 +40,7 @@ open class DgsGraphQLMicrometerAutoConfiguration {
}

@Bean
@Order(PriorityOrdered.LOWEST_PRECEDENCE)
@ConditionalOnProperty(
prefix = "$AUTO_CONF_PREFIX.instrumentation",
name = ["enabled"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ class MicrometerServletSmokeTest {
.and("gql.operation.name", "anonymous")
.and("gql.query.complexity", "none")
.and("gql.query.sig.hash", "none")
.and("gql.errorDetail", "none")
.and("gql.errorDetail", "INVALID_ARGUMENT")
.and("gql.errorCode", "BAD_REQUEST")
.and("gql.path", "[hello]")
.and("outcome", "failure"),
Expand Down

0 comments on commit a1b1909

Please sign in to comment.