Skip to content

Commit d715414

Browse files
Switch to micrometer 1.10 snapshots.
Follow signature changes. See: #4191 See: spring-projects/spring-data-build#1810
1 parent f2c2451 commit d715414

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/observability/MongoObservation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
package org.springframework.data.mongodb.observability;
1717

1818
import io.micrometer.common.docs.KeyName;
19-
import io.micrometer.observation.docs.DocumentedObservation;
19+
import io.micrometer.observation.docs.ObservationDocumentation;
2020

2121
/**
2222
* A MongoDB-based {@link io.micrometer.observation.Observation}.
@@ -25,7 +25,7 @@
2525
* @author Greg Turnquist
2626
* @since 4.0.0
2727
*/
28-
enum MongoObservation implements DocumentedObservation {
28+
enum MongoObservation implements ObservationDocumentation {
2929

3030
/**
3131
* Timer created around a MongoDB command execution.

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/observability/MongoObservationCommandListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ private void setupObservability(CommandStartedEvent event, RequestContext reques
157157
MongoHandlerContext observationContext = new MongoHandlerContext(event, requestContext);
158158

159159
Observation observation = MongoObservation.MONGODB_COMMAND_OBSERVATION
160-
.observation(this.observationRegistry, observationContext) //
160+
.observation(this.observationRegistry, () -> observationContext) //
161161
.contextualName(observationContext.getContextualName()) //
162162
.observationConvention(this.observationConvention) //
163163
.start();

0 commit comments

Comments
 (0)