|
15 | 15 | */
|
16 | 16 | package org.springframework.data.mongodb.observability;
|
17 | 17 |
|
| 18 | +import io.micrometer.observation.Observation; |
| 19 | +import io.micrometer.observation.transport.Kind; |
| 20 | +import io.micrometer.observation.transport.SenderContext; |
| 21 | + |
18 | 22 | import java.util.Arrays;
|
19 | 23 | import java.util.LinkedHashSet;
|
20 | 24 | import java.util.Set;
|
21 | 25 |
|
22 | 26 | import org.bson.BsonDocument;
|
23 | 27 | import org.bson.BsonValue;
|
| 28 | + |
24 | 29 | import org.springframework.lang.Nullable;
|
25 | 30 |
|
26 | 31 | import com.mongodb.ConnectionString;
|
|
29 | 34 | import com.mongodb.event.CommandStartedEvent;
|
30 | 35 | import com.mongodb.event.CommandSucceededEvent;
|
31 | 36 |
|
32 |
| -import io.micrometer.observation.Observation; |
33 |
| -import io.micrometer.observation.transport.Kind; |
34 |
| -import io.micrometer.observation.transport.SenderContext; |
35 |
| - |
36 | 37 | /**
|
37 | 38 | * A {@link Observation.Context} that contains MongoDB events.
|
38 | 39 | *
|
|
41 | 42 | * @author Mark Paluch
|
42 | 43 | * @since 4.0
|
43 | 44 | */
|
44 |
| -class MongoHandlerContext extends SenderContext<Object> { |
| 45 | +public class MongoHandlerContext extends SenderContext<Object> { |
45 | 46 |
|
46 | 47 | /**
|
47 | 48 | * @see <a href=
|
@@ -96,11 +97,11 @@ public ConnectionString getConnectionString() {
|
96 | 97 | return connectionString;
|
97 | 98 | }
|
98 | 99 |
|
99 |
| - public void setCommandSucceededEvent(CommandSucceededEvent commandSucceededEvent) { |
| 100 | + void setCommandSucceededEvent(CommandSucceededEvent commandSucceededEvent) { |
100 | 101 | this.commandSucceededEvent = commandSucceededEvent;
|
101 | 102 | }
|
102 | 103 |
|
103 |
| - public void setCommandFailedEvent(CommandFailedEvent commandFailedEvent) { |
| 104 | + void setCommandFailedEvent(CommandFailedEvent commandFailedEvent) { |
104 | 105 | this.commandFailedEvent = commandFailedEvent;
|
105 | 106 | }
|
106 | 107 |
|
|
0 commit comments