You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [WIP] Micrometer metrics instrumentation
This is a work-in-progress attempt at instrumenting the driver with Micrometer as an optional alternative metrics implementation to the existing internal one.
* Bring it to life.
* Update Micrometer metrics
This update includes general improvements, refactorings and tests.
* Make MetricsAdapter a supported, public api.
- Set scope of micrometer to provided
- Rename MetricsProvider to MetricsAdapter (it does not provide metrics, the driver does. It adapts the drivers metrics to something external)
- Make it a public interface
- Remove dependencies to other internal interfaces and classes (such as BoltServerAddress and the pool itself via ServerAddress and intsuppliers)
- Reduce visibility of internal classes as much as possible
- Make sure that adapters are not serialized
- Apply the clock to the internal adapter (an oversight from the previous iteration)
* Saving a file before commiting seems to be relevant.
* Not messing up the file while saven even more so.
* Make interfaces internal again, provide an enum to select the provider, use global registry by default.
This change keeps the existing serialization feature of config correct.
It will work for everyone just using micrometer as is with the global registry.
if there is a need to select the registriy, we can work on that later.
* Move micrometer-core optional tag to dependency declaration
* Update Config javadoc and remove imports of internal metrics classes
* Update withMetricsEnabled(boolean) implementation
* Enable ConfigBuilder.withMetricsAdapter documentation
* Update driver/src/main/java/org/neo4j/driver/ConnectionPoolMetrics.java
Co-authored-by: Gerrit Meier <[email protected]>
* Update ConnectionPoolMetrics documentation
* Update MetricsAdapter documentation
* Update formatting in ConfigTest
* Update wording
* Updated wording
* Formatting
* Update driver/src/main/java/org/neo4j/driver/internal/metrics/DevNullMetricsListener.java
Co-authored-by: Gerrit Meier <[email protected]>
* Update driver/src/main/java/org/neo4j/driver/internal/metrics/MicrometerConnectionPoolMetrics.java
Co-authored-by: Gerrit Meier <[email protected]>
* Fix compilation error
* Update failing test
* Fix GetConnectionPoolMetrics access
* Delete redundant counters based on review feedback
Co-authored-by: Tommy Ludwig <[email protected]>
Co-authored-by: Gerrit Meier <[email protected]>
Co-authored-by: Michael Simons <[email protected]>
Co-authored-by: Tommy Ludwig <[email protected]>
Co-authored-by: Gerrit Meier <[email protected]>
Co-authored-by: Michael Simons <[email protected]>
* Licensed under the Apache License, Version 2.0 (the "License");
8
+
* you may not use this file except in compliance with the License.
9
+
* You may obtain a copy of the License at
10
+
*
11
+
* http://www.apache.org/licenses/LICENSE-2.0
12
+
*
13
+
* Unless required by applicable law or agreed to in writing, software
14
+
* distributed under the License is distributed on an "AS IS" BASIS,
15
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+
* See the License for the specific language governing permissions and
17
+
* limitations under the License.
18
+
*/
19
+
packageorg.neo4j.driver;
20
+
21
+
/**
22
+
* Defines which metrics consumer to use: Should metrics be consumed and exposed via driver's default consumer or provided with one of the external facades.
23
+
*/
24
+
publicenumMetricsAdapter
25
+
{
26
+
/**
27
+
* Disables metrics.
28
+
*/
29
+
DEV_NULL,
30
+
31
+
/**
32
+
* Consumes and publishes metrics via the driver itself.
33
+
*/
34
+
DEFAULT,
35
+
36
+
/**
37
+
* Consumes and publishes metrics via Micrometer. Ensure that Micrometer is on classpath when using this option.
0 commit comments