mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-15 12:10:21 +00:00
[AB-xxx] try for instrumenting
This commit is contained in:
@@ -9,5 +9,25 @@
|
||||
|
||||
<artifactId>metrics-int</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<artifactId>micrometer-tracing-bridge-brave</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.zipkin.reporter2</groupId>
|
||||
<artifactId>zipkin-reporter-brave</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-aop</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.ttddyy.observation</groupId>
|
||||
<artifactId>datasource-micrometer-spring-boot</artifactId>
|
||||
<version>1.0.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,15 @@
|
||||
package dev.sheldan.abstracto.core.metric.service;
|
||||
|
||||
import io.micrometer.context.ContextSnapshotFactory;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
public class MetricUtils {
|
||||
public static Executor wrapExecutor(Executor e) {
|
||||
return ContextSnapshotFactory
|
||||
.builder()
|
||||
.build()
|
||||
.captureAll()
|
||||
.wrapExecutor(e);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user