Skip to content

Commit 3e6ad67

Browse files
committed
Switch to Micrometer 1.10.0-SNAPSHOT
See gh-32598
1 parent f2f4a4a commit 3e6ad67

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/web/client/ClientObservationConventionAdapter.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ public boolean supportsContext(Observation.Context context) {
5555
public KeyValues getLowCardinalityKeyValues(ClientObservationContext context) {
5656
KeyValues keyValues = KeyValues.empty();
5757
mutateClientRequest(context);
58-
Iterable<Tag> tags = this.tagsProvider.tags(context.getCarrier(), context.getResponse(),
59-
context.getError().orElse(null));
58+
Iterable<Tag> tags = this.tagsProvider.tags(context.getCarrier(), context.getResponse(), context.getError());
6059
for (Tag tag : tags) {
6160
keyValues = keyValues.and(tag.getKey(), tag.getValue());
6261
}

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/observation/ObservationAutoConfigurationTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ void autoConfiguresGlobalObservationConventions() {
9898
this.contextRunner.withUserConfiguration(CustomGlobalObservationConvention.class).run((context) -> {
9999
ObservationRegistry observationRegistry = context.getBean(ObservationRegistry.class);
100100
Context micrometerContext = new Context();
101-
Observation.start("test-observation", micrometerContext, observationRegistry).stop();
101+
Observation.start("test-observation", () -> micrometerContext, observationRegistry).stop();
102102
assertThat(micrometerContext.getAllKeyValues()).containsExactly(KeyValue.of("key1", "value1"));
103103
});
104104
}
@@ -129,7 +129,7 @@ void autoConfiguresObservationHandlerWithCustomContext() {
129129
ObservationRegistry observationRegistry = context.getBean(ObservationRegistry.class);
130130
List<ObservationHandler<?>> handlers = context.getBean(CalledHandlers.class).getCalledHandlers();
131131
CustomContext customContext = new CustomContext();
132-
Observation.start("test-observation", customContext, observationRegistry);
132+
Observation.start("test-observation", () -> customContext, observationRegistry);
133133
assertThat(handlers).hasSize(1);
134134
assertThat(handlers.get(0)).isInstanceOf(ObservationHandlerWithCustomContext.class);
135135
});

spring-boot-project/spring-boot-dependencies/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ bom {
10191019
]
10201020
}
10211021
}
1022-
library("Micrometer", "1.10.0-M6") {
1022+
library("Micrometer", "1.10.0-SNAPSHOT") {
10231023
group("io.micrometer") {
10241024
modules = [
10251025
"micrometer-registry-stackdriver" {

0 commit comments

Comments
 (0)