Created
February 23, 2021 14:55
-
-
Save dalexandrov/1c2c15fd22a5c2dbf54ad0d8489303a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Neo4jMetricsCdiExtension implements Extension { | |
private void addMetrics(@Observes @Priority(PLATFORM_AFTER + 101) @Initialized(ApplicationScoped.class) Object event) { | |
Instance<Driver> driver = CDI.current().select(Driver.class); | |
Neo4jMetricsSupport.builder() | |
.driver(driver.get()) | |
.build() | |
.initialize(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment