>
8 |
9 | [[logging-log4j]]
10 | == Log4j Instrumentation
11 |
12 | [source,java,subs=+attributes]
13 | -----
14 | // Setting up instrumentation
15 | include::{include-core-test-java}/io/micrometer/core/instrument/binder/logging/Log4j2MetricsTest.java[tags=setup, indent=0]
16 |
17 | // Usage example
18 | include::{include-core-test-java}/io/micrometer/core/instrument/binder/logging/Log4j2MetricsTest.java[tags=example, indent=0]
19 | -----
20 |
21 | [[logging-logback]]
22 | == Logback Instrumentation
23 |
24 | [source,java,subs=+attributes]
25 | -----
26 | // Setting up instrumentation
27 | include::{include-core-test-java}/io/micrometer/core/instrument/binder/logging/LogbackMetricsTest.java[tags=setup, indent=0]
28 |
29 | // Usage example
30 | include::{include-core-test-java}/io/micrometer/core/instrument/binder/logging/LogbackMetricsTest.java[tags=example, indent=0]
31 | -----
32 |
--------------------------------------------------------------------------------
/docs/modules/ROOT/pages/reference/netty.adoc:
--------------------------------------------------------------------------------
1 | [[overview]]
2 | = Netty Instrumentation
3 |
4 | Micrometer supports binding metrics to Netty.
5 |
6 | You can collect metrics from `ByteBuf` allocators and from `EventLoopGroup` instances.
7 | If you already know the resources, you can create instrumentation only once at startup:
8 |
9 | [source,java,subs=+attributes]
10 | -----
11 | include::{include-java}/netty/NettyMetricsTests.java[tags=directInstrumentation,indent=0]
12 | -----
13 |
14 | Netty infrastructure can be configured in many ways, so you can also instrument lazily at runtime, as resources are used.
15 | The following example shows how to lazily create instrumentation:
16 |
17 | [source,java,subs=+attributes]
18 | -----
19 | include::{include-java}/netty/NettyMetricsTests.java[tags=channelInstrumentation,indent=0]
20 | -----
21 |
22 | CAUTION: If you use lazy instrumentation, you must ensure that you do not bind metrics for the same resource multiple times, as this can have runtime drawbacks.
23 |
--------------------------------------------------------------------------------
/docs/modules/ROOT/pages/reference/tomcat.adoc:
--------------------------------------------------------------------------------
1 | [[overview]]
2 | = Apache Tomcat Metrics Instrumentation
3 |
4 | The https://tomcat.apache.org/[Apache Tomcat] software is an open source implementation of the Jakarta Servlet, Jakarta Server Pages, Jakarta Expression Language, Jakarta WebSocket, Jakarta Annotations and Jakarta Authentication specifications.
5 |
6 | [source,java,subs=+attributes]
7 | -----
8 | // Setting up instrumentation
9 | include::{include-core-test-java}/io/micrometer/core/instrument/binder/tomcat/TomcatMetricsTest.java[tags=setup, indent=0]
10 |
11 | include::{include-core-test-java}/io/micrometer/core/instrument/binder/tomcat/TomcatMetricsTest.java[tags=monitor, indent=0]
12 |
13 | // Example of Tomcat metrics
14 | include::{include-core-test-java}/io/micrometer/core/instrument/binder/tomcat/TomcatMetricsTest.java[tags=example, indent=0]
15 | -----
16 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.caching=true
2 | org.gradle.jvmargs=-Xmx1g
3 | org.gradle.parallel=true
4 | org.gradle.vfs.watch=true
5 |
6 | compatibleVersion=1.15.0
7 |
8 | kotlin.stdlib.default.dependency=false
9 |
10 | nebula.dependencyLockPluginEnabled=false
11 |
--------------------------------------------------------------------------------
/gradle/licenseHeader.txt:
--------------------------------------------------------------------------------
1 | Copyright ${year} VMware, Inc.
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | https://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/micrometer-metrics/micrometer/b2a4866940f035465704ee9d571478800fb7b9b7/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-appoptics/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | api project(':micrometer-core')
3 |
4 | implementation libs.slf4jApi
5 |
6 | testImplementation project(':micrometer-test')
7 | testImplementation libs.mockitoCore5
8 | }
9 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-appoptics/src/main/java/io/micrometer/appoptics/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.appoptics;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-atlas/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | api project(':micrometer-core')
3 |
4 | api libs.spectatorAtlas
5 |
6 | testImplementation project(':micrometer-test')
7 | }
8 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-atlas/src/main/java/io/micrometer/atlas/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.atlas;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-azure-monitor/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | api project(':micrometer-core')
3 |
4 | api libs.applicationInsights
5 | implementation libs.slf4jApi
6 |
7 | testImplementation project(':micrometer-test')
8 | // required by jdk 9+
9 | testRuntimeOnly libs.jaxbApi
10 | }
11 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-azure-monitor/src/main/java/io/micrometer/azuremonitor/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.azuremonitor;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-cloudwatch2/build.gradle:
--------------------------------------------------------------------------------
1 | description = 'MeterRegistry implementation for publishing to CloudWatch using the AWS SDK v2.'
2 |
3 | dependencies {
4 | api project(':micrometer-core')
5 |
6 | api libs.cloudwatch2
7 | implementation libs.slf4jApi
8 |
9 | testImplementation project(':micrometer-test')
10 | testImplementation libs.mockitoCore5
11 | }
12 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-cloudwatch2/src/main/java/io/micrometer/cloudwatch2/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.cloudwatch2;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-datadog/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | api project(':micrometer-core')
3 |
4 | implementation libs.slf4jApi
5 |
6 | testImplementation project(':micrometer-test')
7 | testImplementation libs.mockitoCore5
8 | }
9 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-datadog/src/main/java/io/micrometer/datadog/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.datadog;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-dynatrace/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | api project(':micrometer-core')
3 |
4 | implementation libs.slf4jApi
5 |
6 | implementation(libs.dynatraceUtils)
7 |
8 | testImplementation project(':micrometer-test')
9 | testImplementation libs.mockitoCore5
10 | testImplementation libs.jacksonDatabind
11 | testImplementation libs.awaitility
12 | }
13 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-dynatrace/src/main/java/io/micrometer/dynatrace/DynatraceApiVersion.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.dynatrace;
17 |
18 | /**
19 | * An enum containing valid Dynatrace API versions.
20 | *
21 | * @author Georg Pirklbauer
22 | * @since 1.8.0
23 | */
24 | public enum DynatraceApiVersion {
25 |
26 | V1, V2
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-dynatrace/src/main/java/io/micrometer/dynatrace/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.dynatrace;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-dynatrace/src/main/java/io/micrometer/dynatrace/types/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Dynatrace-specific Meters to support Dynatrace v2 metrics API.
19 | */
20 | package io.micrometer.dynatrace.types;
21 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-dynatrace/src/main/java/io/micrometer/dynatrace/v1/DynatraceBatchedPayload.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.dynatrace.v1;
17 |
18 | class DynatraceBatchedPayload {
19 |
20 | final String payload;
21 |
22 | final int metricCount;
23 |
24 | DynatraceBatchedPayload(String payload, int metricCount) {
25 | this.payload = payload;
26 | this.metricCount = metricCount;
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-dynatrace/src/main/java/io/micrometer/dynatrace/v1/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support for Dynatrace v1 metrics API export.
19 | */
20 | package io.micrometer.dynatrace.v1;
21 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-dynatrace/src/main/java/io/micrometer/dynatrace/v2/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support for Dynatrace v2 metrics API export.
19 | */
20 | package io.micrometer.dynatrace.v2;
21 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-elastic/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | api project(':micrometer-core')
3 |
4 | implementation libs.slf4jApi
5 |
6 | testImplementation project(':micrometer-test')
7 | // TODO: upgrade when we figure out how to unbreak things due to this change: https://github.com/testcontainers/testcontainers-java/pull/5099
8 | testImplementation 'org.testcontainers:elasticsearch:1.16.3'
9 | testImplementation libs.testcontainers.junitJupiter
10 | testImplementation libs.jsonPath
11 | testImplementation libs.logback12
12 | }
13 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-elastic/src/main/java/io/micrometer/elastic/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.elastic;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-elastic/src/test/java/io/micrometer/elastic/Elasticsearch7ApiKeyIntegrationTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.elastic;
17 |
18 | /**
19 | * Integration tests with API key authentication for Elasticsearch 7.
20 | *
21 | * @author Johnny Lim
22 | */
23 | class Elasticsearch7ApiKeyIntegrationTest extends AbstractElasticsearchApiKeyIntegrationTest {
24 |
25 | @Override
26 | protected String getVersion() {
27 | return VERSION_7;
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-elastic/src/test/java/io/micrometer/elastic/Elasticsearch8ApiKeyIntegrationTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.elastic;
17 |
18 | /**
19 | * Integration tests with API key authentication for Elasticsearch 8.
20 | *
21 | * @author Johnny Lim
22 | */
23 | class Elasticsearch8ApiKeyIntegrationTest extends AbstractElasticsearchApiKeyIntegrationTest {
24 |
25 | @Override
26 | protected String getVersion() {
27 | return VERSION_8;
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-ganglia/README.adoc:
--------------------------------------------------------------------------------
1 | = micrometer-registry-ganglia
2 |
3 | This module contains the implementation of a Micrometer `MeterRegistry` for the Ganglia metrics backend.
4 |
5 | NOTE: The micrometer-registry-ganglia module uses the https://github.com/ganglia/gmetric4j[gmetric4j] library which contains classes generated by the LGPL licensed https://sourceforge.net/projects/remotetea/[remotetea project]
6 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-ganglia/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | api project(':micrometer-core')
3 |
4 | api libs.gmetric4j
5 | implementation libs.slf4jApi
6 |
7 | // Deprecated constructor references this which is otherwise unused.
8 | compileOnly libs.dropwizardMetricsCore
9 |
10 | testImplementation project(':micrometer-test')
11 | }
12 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-ganglia/src/main/java/io/micrometer/ganglia/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.ganglia;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-graphite/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | api project(':micrometer-core')
3 |
4 | api libs.dropwizardMetricsGraphite
5 |
6 | testImplementation project(':micrometer-test')
7 | testImplementation platform(libs.reactorBom)
8 | testImplementation 'io.projectreactor.netty:reactor-netty-core'
9 | }
10 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-graphite/src/main/java/io/micrometer/graphite/GraphiteProtocol.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.graphite;
17 |
18 | public enum GraphiteProtocol {
19 |
20 | PLAINTEXT, UDP, PICKLED
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-graphite/src/main/java/io/micrometer/graphite/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.graphite;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-health/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | api project(':micrometer-core')
3 |
4 | implementation libs.slf4jApi
5 |
6 | testImplementation project(':micrometer-test')
7 | }
8 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-health/src/main/java/io/micrometer/health/objectives/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Predefined {@link io.micrometer.health.ServiceLevelObjective ServiceLevelObjective
19 | * classes}.
20 | */
21 | package io.micrometer.health.objectives;
22 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-health/src/main/java/io/micrometer/health/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * SLO-based health meter registry.
18 | */
19 | @NullMarked
20 | package io.micrometer.health;
21 |
22 | import org.jspecify.annotations.NullMarked;
23 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-humio/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | api project(':micrometer-core')
3 |
4 | implementation libs.slf4jApi
5 |
6 | testImplementation project(':micrometer-test')
7 | }
8 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-humio/src/main/java/io/micrometer/humio/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.humio;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-influx/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | api project(':micrometer-core')
3 |
4 | implementation libs.slf4jApi
5 |
6 | testImplementation project(':micrometer-test')
7 | }
8 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-influx/src/main/java/io/micrometer/influx/InfluxConsistency.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.influx;
17 |
18 | public enum InfluxConsistency {
19 |
20 | ANY, ONE, QUORUM, ALL
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-influx/src/main/java/io/micrometer/influx/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.influx;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-jmx/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | api project(':micrometer-core')
3 |
4 | api libs.dropwizardMetricsJmx
5 |
6 | testImplementation project(':micrometer-test')
7 | testImplementation libs.logback12
8 | }
9 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-jmx/src/main/java/io/micrometer/jmx/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.jmx;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-kairos/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | api project(':micrometer-core')
3 |
4 | implementation libs.slf4jApi
5 |
6 | testImplementation project(':micrometer-test')
7 | }
8 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-kairos/src/main/java/io/micrometer/kairos/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.kairos;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-new-relic/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | api project(':micrometer-core')
3 |
4 | implementation libs.slf4jApi
5 | optionalApi libs.newrelicApi
6 |
7 | testImplementation project(':micrometer-test')
8 | testImplementation libs.mockitoCore5
9 | }
10 |
11 | jar {
12 | // gh-3412 override our default name because 'new' is a reserved word
13 | manifest.attributes.put('Automatic-Module-Name', 'micrometer.registry.newrelic')
14 | }
15 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-new-relic/src/main/java/io/micrometer/newrelic/ClientProviderType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.newrelic;
17 |
18 | /**
19 | * Types for {@link NewRelicClientProvider}.
20 | *
21 | * @author Neil Powell
22 | * @since 1.4.0
23 | */
24 | public enum ClientProviderType {
25 |
26 | INSIGHTS_API, INSIGHTS_AGENT
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-new-relic/src/main/java/io/micrometer/newrelic/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.newrelic;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-opentsdb/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | api project(':micrometer-core')
3 |
4 | implementation libs.slf4jApi
5 |
6 | testImplementation project(':micrometer-test')
7 | }
8 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-opentsdb/src/main/java/io/micrometer/opentsdb/OpenTSDBFlavor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.opentsdb;
17 |
18 | /**
19 | * OpenTSDB flavors.
20 | *
21 | * @author Jon Schneider
22 | * @since 1.4.0
23 | */
24 | public enum OpenTSDBFlavor {
25 |
26 | VictoriaMetrics
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-opentsdb/src/main/java/io/micrometer/opentsdb/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.opentsdb;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-otlp/build.gradle:
--------------------------------------------------------------------------------
1 | description = 'Publishes Micrometer meters in OTLP format'
2 |
3 | dependencies {
4 | api project(':micrometer-core')
5 |
6 | implementation libs.openTelemetry.proto
7 |
8 | testImplementation project(':micrometer-test')
9 | testImplementation libs.systemStubsJupiter
10 | testImplementation libs.restAssured
11 | testImplementation libs.testcontainers.junitJupiter
12 | testImplementation libs.awaitility
13 | testImplementation libs.mockitoCore5
14 | }
15 |
16 | dockerTest {
17 | systemProperty 'otel-collector-image.version', '0.104.0'
18 | }
19 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-otlp/src/main/java/io/micrometer/registry/otlp/OtlpHistogramSupport.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2023 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.registry.otlp;
17 |
18 | import io.micrometer.registry.otlp.internal.ExponentialHistogramSnapShot;
19 | import org.jspecify.annotations.Nullable;
20 |
21 | interface OtlpHistogramSupport {
22 |
23 | @Nullable ExponentialHistogramSnapShot getExponentialHistogramSnapShot();
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-otlp/src/main/java/io/micrometer/registry/otlp/StartTimeAwareMeter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.registry.otlp;
17 |
18 | import io.micrometer.core.instrument.Meter;
19 |
20 | interface StartTimeAwareMeter extends Meter {
21 |
22 | long getStartTimeNanos();
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-otlp/src/main/java/io/micrometer/registry/otlp/internal/IndexProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2023 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.registry.otlp.internal;
17 |
18 | interface IndexProvider {
19 |
20 | int getIndexForValue(final double value);
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-otlp/src/main/java/io/micrometer/registry/otlp/internal/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2023 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | @NullMarked
18 | package io.micrometer.registry.otlp.internal;
19 |
20 | import org.jspecify.annotations.NullMarked;
21 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-otlp/src/main/java/io/micrometer/registry/otlp/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.registry.otlp;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-otlp/src/test/resources/otlp-config.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2022 VMware, Inc.
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # https://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | otlp.resourceAttributes=key1=value1,key2=value2
18 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-prometheus-simpleclient/build.gradle:
--------------------------------------------------------------------------------
1 | description = 'MeterRegistry implementation for Prometheus using io.prometheus:simpleclient_common. This module is deprecated in favor of io.micrometer:micrometer-registry-prometheus that uses io.prometheus:prometheus-metrics-core.'
2 |
3 | dependencies {
4 | api(platform(libs.prometheusSimpleClientBom))
5 |
6 | api project(':micrometer-core')
7 |
8 | api libs.prometheusSimpleClient
9 |
10 | testImplementation project(':micrometer-test')
11 | }
12 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-prometheus-simpleclient/src/main/java/io/micrometer/prometheus/HistogramFlavor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.prometheus;
17 |
18 | /**
19 | * Histogram flavors.
20 | *
21 | * @deprecated since 1.13.0, unfortunately there is no replacement right now since the new
22 | * Prometheus client does not support custom histogram bucket names.
23 | * @author Jon Schneider
24 | * @since 1.4.0
25 | */
26 | @Deprecated
27 | public enum HistogramFlavor {
28 |
29 | Prometheus, VictoriaMetrics
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-prometheus-simpleclient/src/main/java/io/micrometer/prometheus/RequiresNonNull.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2025 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.prometheus;
17 |
18 | import java.lang.annotation.*;
19 |
20 | /**
21 | * This is for internal use only.
22 | */
23 | @Documented
24 | @Retention(RetentionPolicy.CLASS)
25 | @Target(ElementType.METHOD)
26 | @interface RequiresNonNull {
27 |
28 | /**
29 | * The list of fields that are non-null.
30 | */
31 | String[] value();
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-prometheus-simpleclient/src/main/java/io/micrometer/prometheus/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Deprecated since 1.13.0, use io.micrometer:micrometer-registry-prometheus instead, the
19 | * new package name is {@code io.micrometer.prometheusmetrics}.
20 | */
21 | @NullMarked
22 | @Deprecated
23 | package io.micrometer.prometheus;
24 |
25 | import org.jspecify.annotations.NullMarked;
26 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-prometheus/build.gradle:
--------------------------------------------------------------------------------
1 | description = 'MeterRegistry implementation for Prometheus using io.prometheus:prometheus-metrics-core. If you have compatibility issues with this module, you can go back to io.micrometer:micrometer-registry-prometheus-simpleclient that uses io.prometheus:simpleclient_common.'
2 |
3 | dependencies {
4 | api(platform(libs.prometheusMetricsBom))
5 |
6 | api project(':micrometer-core')
7 |
8 | api(libs.prometheusMetrics) {
9 | // We only need SpanContext from prometheus-metrics-tracer-common, we don't need
10 | // prometheus-metrics-tracer-initializer nor the dependencies it pulls in
11 | exclude(group: 'io.prometheus', module: 'prometheus-metrics-tracer-initializer')
12 | }
13 | api libs.prometheusMetricsTracerCommon
14 | implementation libs.prometheusMetricsExpositionFormats
15 |
16 | testImplementation project(':micrometer-test')
17 | testImplementation libs.restAssured
18 | testImplementation libs.testcontainers.junitJupiter
19 | testImplementation libs.awaitility
20 | }
21 |
22 | dockerTest {
23 | systemProperty 'prometheus.version', 'v2.55.1'
24 | }
25 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-prometheus/src/main/java/io/micrometer/prometheusmetrics/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.prometheusmetrics;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-prometheus/src/test/resources/prometheus.yml:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2024 VMware, Inc.
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # https://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | global:
18 | scrape_interval: 5s
19 | evaluation_interval: 5s
20 |
21 | scrape_configs:
22 | - job_name: 'test-app-om' # test app that produces OpenMetrics output
23 | static_configs:
24 | - targets: [ 'host.testcontainers.internal:12345']
25 | - job_name: 'test-app-pt' # test app that produces Prometheus text output
26 | static_configs:
27 | - targets: [ 'host.testcontainers.internal:12346' ]
28 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-signalfx/build.gradle:
--------------------------------------------------------------------------------
1 | description = 'MeterRegistry implementation for sending metrics to SignalFX. This module is deprecated in favor of the micrometer-registry-otlp module.'
2 |
3 | dependencies {
4 | api project(':micrometer-core')
5 |
6 | api libs.signalfx
7 | implementation libs.slf4jApi
8 |
9 | testImplementation project(':micrometer-test')
10 | }
11 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-signalfx/src/main/java/io/micrometer/signalfx/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.signalfx;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-stackdriver/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | api project(':micrometer-core')
3 |
4 | api platform(libs.googleCloudLibrariesBom)
5 |
6 | api(libs.googleCloudMonitoring) {
7 | // see gh-4010
8 | exclude group: 'com.google.guava', module: 'listenablefuture'
9 | }
10 | api libs.googleOauth2Http
11 | implementation libs.slf4jApi
12 | compileOnly libs.logback12
13 | testRuntimeOnly libs.logback12
14 | // needed for extending TimeWindowPercentileHistogram in StackdriverHistogramUtil
15 | compileOnly libs.hdrhistogram
16 |
17 | testImplementation project(':micrometer-test')
18 | }
19 |
20 | test {
21 | useJUnitPlatform {
22 | excludeTags 'gcp-it'
23 | }
24 | }
25 |
26 | tasks.register("stackdriverTest", Test) {
27 | useJUnitPlatform {
28 | includeTags 'gcp-it'
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-stackdriver/src/main/java/io/micrometer/stackdriver/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.stackdriver;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-stackdriver/src/main/java/io/micrometer/stackdriver/util/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Utilities for Stackdriver.
19 | */
20 | package io.micrometer.stackdriver.util;
21 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-statsd/src/main/java/io/micrometer/statsd/StatsdMetrics.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.statsd;
17 |
18 | import io.micrometer.core.instrument.MeterRegistry;
19 | import io.micrometer.core.instrument.binder.MeterBinder;
20 |
21 | /**
22 | * @deprecated statsd metrics are no longer available since 1.4.0
23 | */
24 | @Deprecated
25 | public class StatsdMetrics implements MeterBinder {
26 |
27 | @Override
28 | public void bindTo(MeterRegistry registry) {
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-statsd/src/main/java/io/micrometer/statsd/StatsdPollable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.statsd;
17 |
18 | interface StatsdPollable {
19 |
20 | void poll();
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-statsd/src/main/java/io/micrometer/statsd/StatsdProtocol.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.statsd;
17 |
18 | /**
19 | * Protocol for StatsD.
20 | *
21 | * @author Soroosh Sarabadani
22 | * @since 1.2.0
23 | */
24 | public enum StatsdProtocol {
25 |
26 | UDP,
27 | /**
28 | * Unix domain socket datagram.
29 | * @since 1.8.0
30 | */
31 | UDS_DATAGRAM, TCP
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-statsd/src/main/java/io/micrometer/statsd/internal/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.statsd.internal;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-statsd/src/main/java/io/micrometer/statsd/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.statsd;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-wavefront/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | api project(':micrometer-core')
3 |
4 | api libs.wavefront
5 | implementation libs.slf4jApi
6 |
7 | testImplementation project(':micrometer-test')
8 | testImplementation libs.mockitoCore5
9 | }
10 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-wavefront/src/main/java/io/micrometer/wavefront/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.wavefront;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-wavefront/src/test/resources/invalid.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2023 VMware, Inc.
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # https://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | wavefront.uri=:not-a-uri
18 |
--------------------------------------------------------------------------------
/implementations/micrometer-registry-wavefront/src/test/resources/valid.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2023 VMware, Inc.
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # https://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | wavefront.uri=proxy://example.com:2878
18 |
--------------------------------------------------------------------------------
/micrometer-bom/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java-platform'
3 | }
4 |
5 | description 'Micrometer BOM (Bill of Materials) for managing Micrometer artifact versions'
6 |
7 | dependencies {
8 | constraints {
9 | rootProject.subprojects.findAll {
10 | !it.name.contains('sample') &&
11 | !it.name.contains('benchmark') &&
12 | !it.name.contains('concurrency-tests') &&
13 | !it.name.contains('micrometer-bom') &&
14 | !it.name.contains('micrometer-osgi-test') &&
15 | !it.name.contains('-test-aspectj') &&
16 | it.name != 'docs'
17 | }.each {
18 | api(group: it.group,
19 | name: it.name,
20 | version: it.version.toString())
21 | }
22 | api libs.contextPropagation
23 | }
24 | }
25 |
26 | publishing {
27 | publications {
28 | nebula(MavenPublication) {
29 | from components.javaPlatform
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/micrometer-commons/build.gradle:
--------------------------------------------------------------------------------
1 | description 'Module containing common code'
2 |
3 | dependencies {
4 | // internal logger
5 | optionalApi libs.logback12
6 |
7 | // Aspects
8 | optionalApi libs.aspectjrt
9 |
10 | testImplementation libs.assertj
11 | }
12 |
13 | jar {
14 | bundle {
15 |
16 | bnd '''\
17 | Import-Package: \
18 | org.aspectj.*;resolution:=dynamic,\
19 | javax.annotation.*;resolution:=optional;version="${@}",\
20 | *
21 | '''.stripIndent()
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/micrometer-commons/src/main/java/io/micrometer/common/annotation/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2023 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.common.annotation;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/micrometer-commons/src/main/java/io/micrometer/common/docs/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.common.docs;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/micrometer-commons/src/main/java/io/micrometer/common/lang/internal/Contract.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2025 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.common.lang.internal;
17 |
18 | import java.lang.annotation.*;
19 |
20 | /**
21 | * This is for internal use only.
22 | */
23 | @Documented
24 | @Retention(RetentionPolicy.CLASS)
25 | @Target(ElementType.METHOD)
26 | public @interface Contract {
27 |
28 | String value() default "";
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/micrometer-commons/src/main/java/io/micrometer/common/lang/internal/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2025 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.common.lang.internal;
17 |
--------------------------------------------------------------------------------
/micrometer-commons/src/main/java/io/micrometer/common/lang/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.common.lang;
17 |
--------------------------------------------------------------------------------
/micrometer-commons/src/main/java/io/micrometer/common/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.common;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/micrometer-commons/src/main/java/io/micrometer/common/util/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.common.util;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/micrometer-commons/src/test/java/io/micrometer/common/annotation/NoOpValueResolverTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2023 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.common.annotation;
17 |
18 | import org.junit.jupiter.api.Test;
19 |
20 | import static org.assertj.core.api.BDDAssertions.then;
21 |
22 | /**
23 | * @author Marcin Grzejszczak
24 | */
25 | class NoOpValueResolverTests {
26 |
27 | @Test
28 | void should_return_empty_string() {
29 | then(new NoOpValueResolver().resolve("")).isBlank();
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/annotation/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Core annotations.
19 | */
20 | package io.micrometer.core.annotation;
21 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/aop/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * AOP-based metrics support.
19 | */
20 | package io.micrometer.core.aop;
21 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | package io.micrometer.core.instrument.binder.cache;
18 |
19 | import io.micrometer.common.lang.NonNullApi;
20 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/commonspool2/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Meter binders for Apache Commons Pool 2.x.
19 | */
20 | package io.micrometer.core.instrument.binder.commonspool2;
21 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/db/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Meter binders for databases.
19 | */
20 | package io.micrometer.core.instrument.binder.db;
21 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/grpc/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Collect metrics for grpc-java clients and servers.
18 | *
19 | * Refer to
20 | * {@link io.micrometer.core.instrument.binder.grpc.MetricCollectingClientInterceptor} and
21 | * {@link io.micrometer.core.instrument.binder.grpc.MetricCollectingServerInterceptor} for
22 | * usage examples.
23 | */
24 | @NonNullApi
25 | package io.micrometer.core.instrument.binder.grpc;
26 |
27 | import io.micrometer.common.lang.NonNullApi;
28 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/http/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.core.instrument.binder.http;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/httpcomponents/hc5/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2023 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Meter binders for Apache HttpComponents 5.
19 | */
20 | @NonNullFields
21 | @NonNullApi
22 | package io.micrometer.core.instrument.binder.httpcomponents.hc5;
23 |
24 | import io.micrometer.common.lang.NonNullApi;
25 | import io.micrometer.common.lang.NonNullFields;
26 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/httpcomponents/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Meter binders for Apache HttpComponents.
19 | */
20 | @NonNullFields
21 | @NonNullApi
22 | package io.micrometer.core.instrument.binder.httpcomponents;
23 |
24 | import io.micrometer.common.lang.NonNullApi;
25 | import io.micrometer.common.lang.NonNullFields;
26 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/hystrix/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Meter binders for Hystrix. Deprecated since 1.13.0, Hystrix is no longer in active
19 | * development, and is currently in maintenance mode.
20 | */
21 | @Deprecated
22 | package io.micrometer.core.instrument.binder.hystrix;
23 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/jersey/server/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Meter binders for Jersey.
19 | * @deprecated since 1.13.0 use the jersey-micrometer module in the Jersey project instead
20 | */
21 | package io.micrometer.core.instrument.binder.jersey.server;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/jetty/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Meter binders for Jetty.
19 | */
20 | @NonNullApi
21 | package io.micrometer.core.instrument.binder.jetty;
22 |
23 | import io.micrometer.common.lang.NonNullApi;
24 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/jpa/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Meter binders for JPA.
19 | */
20 | package io.micrometer.core.instrument.binder.jpa;
21 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/jvm/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Meter binders for JVM.
19 | */
20 | package io.micrometer.core.instrument.binder.jvm;
21 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/kafka/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Meter binders for Apache Kafka.
19 | */
20 | package io.micrometer.core.instrument.binder.kafka;
21 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/logging/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Meter binders for logging frameworks.
19 | */
20 | package io.micrometer.core.instrument.binder.logging;
21 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/mongodb/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Meter binders for MongoDB.
19 | */
20 | package io.micrometer.core.instrument.binder.mongodb;
21 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/netty4/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2023 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Meter binders for Netty 4.x.
19 | */
20 | @NonNullApi
21 | @NonNullFields
22 | package io.micrometer.core.instrument.binder.netty4;
23 |
24 | import io.micrometer.common.lang.NonNullApi;
25 | import io.micrometer.common.lang.NonNullFields;
26 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/okhttp3/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Meter binders for OkHttp 3.
19 | */
20 | package io.micrometer.core.instrument.binder.okhttp3;
21 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Meter binders.
19 | */
20 | @NonNullApi
21 | @NonNullFields
22 | package io.micrometer.core.instrument.binder;
23 |
24 | import io.micrometer.common.lang.NonNullApi;
25 | import io.micrometer.common.lang.NonNullFields;
26 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/system/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Meter binders for an operating system.
19 | */
20 | package io.micrometer.core.instrument.binder.system;
21 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/tomcat/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Meter binders for Apache Tomcat.
19 | */
20 | package io.micrometer.core.instrument.binder.tomcat;
21 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/composite/CompositeMeter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.core.instrument.composite;
17 |
18 | import io.micrometer.core.instrument.Meter;
19 | import io.micrometer.core.instrument.MeterRegistry;
20 |
21 | interface CompositeMeter extends Meter {
22 |
23 | void add(MeterRegistry registry);
24 |
25 | void remove(MeterRegistry registry);
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/composite/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.core.instrument.composite;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/config/MeterFilterReply.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.core.instrument.config;
17 |
18 | public enum MeterFilterReply {
19 |
20 | DENY, NEUTRAL, ACCEPT
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/config/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.core.instrument.config;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/config/validate/InvalidReason.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.core.instrument.config.validate;
17 |
18 | /**
19 | * Invalid reason.
20 | *
21 | * @author Jon Schneider
22 | * @since 1.5.0
23 | */
24 | public enum InvalidReason {
25 |
26 | MALFORMED, MISSING
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/config/validate/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support for meter registry configuration validation.
19 | */
20 | package io.micrometer.core.instrument.config.validate;
21 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/cumulative/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.core.instrument.cumulative;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/distribution/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.core.instrument.distribution;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/distribution/pause/NoPauseDetector.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.core.instrument.distribution.pause;
17 |
18 | public class NoPauseDetector implements PauseDetector {
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/distribution/pause/PauseDetector.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.core.instrument.distribution.pause;
17 |
18 | public interface PauseDetector {
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/distribution/pause/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.core.instrument.distribution.pause;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/docs/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.core.instrument.docs;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/dropwizard/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.core.instrument.dropwizard;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/internal/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.core.instrument.internal;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/kotlin/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.core.instrument.kotlin;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/logging/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.core.instrument.logging;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/noop/NoopCounter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.core.instrument.noop;
17 |
18 | import io.micrometer.core.instrument.Counter;
19 |
20 | public class NoopCounter extends NoopMeter implements Counter {
21 |
22 | public NoopCounter(Id id) {
23 | super(id);
24 | }
25 |
26 | @Override
27 | public void increment(double amount) {
28 | }
29 |
30 | @Override
31 | public double count() {
32 | return 0;
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/noop/NoopFunctionCounter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.core.instrument.noop;
17 |
18 | import io.micrometer.core.instrument.FunctionCounter;
19 |
20 | public class NoopFunctionCounter extends NoopMeter implements FunctionCounter {
21 |
22 | public NoopFunctionCounter(Id id) {
23 | super(id);
24 | }
25 |
26 | @Override
27 | public double count() {
28 | return 0;
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/noop/NoopGauge.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.core.instrument.noop;
17 |
18 | import io.micrometer.core.instrument.Gauge;
19 |
20 | public class NoopGauge extends NoopMeter implements Gauge {
21 |
22 | public NoopGauge(Id id) {
23 | super(id);
24 | }
25 |
26 | @Override
27 | public double value() {
28 | return 0;
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/noop/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.core.instrument.noop;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/observation/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.core.instrument.observation;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.core.instrument;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/push/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.core.instrument.push;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/search/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.core.instrument.search;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/simple/CountingMode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.core.instrument.simple;
17 |
18 | public enum CountingMode {
19 |
20 | /**
21 | * Counts and totals are monotonically increasing.
22 | */
23 | CUMULATIVE,
24 |
25 | /**
26 | * Rate normalize counts and totals.
27 | */
28 | STEP
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/simple/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.core.instrument.simple;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/step/StepMeter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2023 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.core.instrument.step;
17 |
18 | /**
19 | * Internal. Intentionally package-private.
20 | */
21 | interface StepMeter {
22 |
23 | /**
24 | * This is an internal method not meant for general use.
25 | *
26 | * Force a rollover of the values returned by a step meter and never roll over again
27 | * after.
28 | */
29 | void _closingRollover();
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/step/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.core.instrument.step;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/instrument/util/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.core.instrument.util;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/ipc/http/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support for HTTP communication.
19 | */
20 | package io.micrometer.core.ipc.http;
21 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/java/io/micrometer/core/lang/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Common annotations with language-level semantics.
19 | */
20 | package io.micrometer.core.lang;
21 |
--------------------------------------------------------------------------------
/micrometer-core/src/main/resources/META-INF/native-image/io.micrometer/micrometer-core/proxy-config.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "condition": {
4 | "typeReachable": "io.micrometer.core.instrument.binder.jms.JmsInstrumentation"
5 | },
6 | "interfaces": [
7 | "jakarta.jms.Session"
8 | ]
9 | },
10 | {
11 | "condition": {
12 | "typeReachable": "io.micrometer.core.instrument.binder.jms.JmsInstrumentation"
13 | },
14 | "interfaces": [
15 | "jakarta.jms.MessageConsumer"
16 | ]
17 | },
18 | {
19 | "condition": {
20 | "typeReachable": "io.micrometer.core.instrument.binder.jms.JmsInstrumentation"
21 | },
22 | "interfaces": [
23 | "jakarta.jms.MessageProducer"
24 | ]
25 | }
26 | ]
27 |
--------------------------------------------------------------------------------
/micrometer-core/src/test/java/io/micrometer/core/aop/CountedAspectTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.core.aop;
17 |
18 | /**
19 | * Unit tests for the {@link CountedAspect} aspect have been moved to the module
20 | * micrometer-samples-spring-framework6 to test with the current version of Spring that
21 | * requires JDK 17+.
22 | *
23 | * @author Ali Dehghani
24 | * @author Tommy Ludwig
25 | * @author Johnny Lim
26 | * @author Yanming Zhou
27 | */
28 | class CountedAspectTest {
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/micrometer-core/src/test/java/io/micrometer/core/aop/MeterTagSupportTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2024 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.core.aop;
17 |
18 | /**
19 | * Tests for {@link MeterTagSupport} have been moved to the module
20 | * micrometer-samples-spring-framework6 to test with the current version of Spring that
21 | * requires JDK 17+.
22 | *
23 | * @author Marcin Grzejszczak
24 | * @author Johnny Lim
25 | */
26 | class MeterTagSupportTests {
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/micrometer-core/src/test/java/io/micrometer/core/aop/TimedAspectTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.core.aop;
17 |
18 | /**
19 | * {@link TimedAspect} tests have been moved to the module
20 | * micrometer-samples-spring-framework6 to test with the current version of Spring that
21 | * requires JDK 17+.
22 | */
23 | class TimedAspectTest {
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/micrometer-core/src/test/java/io/micrometer/core/instrument/binder/jvm/GcTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.core.instrument.binder.jvm;
17 |
18 | import org.junit.jupiter.api.Tag;
19 |
20 | import java.lang.annotation.ElementType;
21 | import java.lang.annotation.Retention;
22 | import java.lang.annotation.RetentionPolicy;
23 | import java.lang.annotation.Target;
24 |
25 | @Target({ ElementType.TYPE, ElementType.METHOD })
26 | @Retention(RetentionPolicy.RUNTIME)
27 | @Tag("gc")
28 | public @interface GcTest {
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/micrometer-core/src/test/java/io/micrometer/core/testsupport/classpath/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Custom JUnit extension to change the classpath. The code in this package was copied
19 | * from the Spring Boot project.
20 | */
21 | package io.micrometer.core.testsupport.classpath;
22 |
--------------------------------------------------------------------------------
/micrometer-core/src/test/java/io/micrometer/core/testsupport/system/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Classes for {@link java.lang.System System}-related testing.
19 | */
20 | package io.micrometer.core.testsupport.system;
21 |
--------------------------------------------------------------------------------
/micrometer-jakarta9/build.gradle:
--------------------------------------------------------------------------------
1 | description 'Module for Jakarta 9+ based instrumentations'
2 |
3 | jar {
4 | bundle {
5 |
6 | bnd '''\
7 | Import-Package: \
8 | jakarta.jms.*;resolution:=dynamic;version="${@}",\
9 | io.micrometer.observation.*;resolution:=dynamic;version="${@}",\
10 | *
11 | '''.stripIndent()
12 | }
13 | }
14 |
15 | dependencies {
16 | api project(":micrometer-core")
17 | api project(":micrometer-commons")
18 | api project(":micrometer-observation")
19 |
20 | optionalApi libs.jakarta.jmsApi
21 |
22 | testImplementation(libs.archunitJunit5) {
23 | // avoid transitively pulling in slf4j 2
24 | exclude group: "org.slf4j", module: "slf4j-api"
25 | }
26 | testImplementation libs.slf4jApi
27 | testImplementation libs.mockitoCore5
28 | testImplementation libs.assertj
29 | }
30 |
--------------------------------------------------------------------------------
/micrometer-jakarta9/src/main/java/io/micrometer/jakarta9/instrument/jms/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2023 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Observation instrumentation for Jakarta JMS.
19 | */
20 | @NullMarked
21 | package io.micrometer.jakarta9.instrument.jms;
22 |
23 | import org.jspecify.annotations.NullMarked;
24 |
--------------------------------------------------------------------------------
/micrometer-java11/build.gradle:
--------------------------------------------------------------------------------
1 | description 'Micrometer core classes that require Java 11'
2 |
3 | dependencies {
4 | api project(":micrometer-core")
5 |
6 | testImplementation project(":micrometer-test")
7 | testImplementation libs.wiremockJunit5
8 | testImplementation libs.wiremock
9 | testImplementation project(":micrometer-observation-test")
10 | }
11 |
12 | java {
13 | targetCompatibility = JavaVersion.VERSION_11
14 | }
15 |
16 | tasks.withType(JavaCompile).configureEach {
17 | sourceCompatibility = JavaVersion.VERSION_11
18 | targetCompatibility = JavaVersion.VERSION_11
19 | options.release = 11
20 | }
21 |
--------------------------------------------------------------------------------
/micrometer-java11/src/main/java/io/micrometer/java11/instrument/binder/jdk/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2024 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Instrumentation of JDK classes.
19 | */
20 | @NullMarked
21 | package io.micrometer.java11.instrument.binder.jdk;
22 |
23 | import org.jspecify.annotations.NullMarked;
24 |
--------------------------------------------------------------------------------
/micrometer-java21/src/main/java/io/micrometer/java21/instrument/binder/jdk/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2024 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Instrumentation of JDK classes.
19 | */
20 | @NullMarked
21 | package io.micrometer.java21.instrument.binder.jdk;
22 |
23 | import org.jspecify.annotations.NullMarked;
24 |
--------------------------------------------------------------------------------
/micrometer-jetty11/build.gradle:
--------------------------------------------------------------------------------
1 | description 'Micrometer instrumentation for Jetty 11'
2 |
3 | dependencies {
4 | api project(":micrometer-core")
5 | api libs.jetty11Server
6 |
7 | testImplementation libs.assertj
8 | }
9 |
10 | java {
11 | targetCompatibility = 11
12 | }
13 |
14 | compileJava {
15 | sourceCompatibility = JavaVersion.VERSION_11
16 | targetCompatibility = JavaVersion.VERSION_11
17 | options.release = 11
18 | }
19 |
--------------------------------------------------------------------------------
/micrometer-jetty11/src/main/java/io/micrometer/jetty11/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Instrumentation for Jetty 11.
19 | */
20 | @NullMarked
21 | package io.micrometer.jetty11;
22 |
23 | import org.jspecify.annotations.NullMarked;
24 |
--------------------------------------------------------------------------------
/micrometer-jetty12/build.gradle:
--------------------------------------------------------------------------------
1 | description 'Micrometer instrumentation for Jetty 12'
2 |
3 | // skip this module when building with jdk <17
4 | if (!javaLanguageVersion.canCompileOrRun(17)) {
5 | project.tasks.configureEach { task -> task.enabled = false }
6 | }
7 |
8 | dependencies {
9 | api project(":micrometer-core")
10 |
11 | optionalApi libs.jetty12Server
12 | optionalApi libs.jetty12Client
13 |
14 | testRuntimeOnly(libs.logbackLatest)
15 |
16 | testImplementation project(":micrometer-observation-test")
17 | testImplementation project(":micrometer-test")
18 |
19 | testImplementation libs.httpcomponents.client
20 | testImplementation libs.awaitility
21 | }
22 |
23 | java {
24 | targetCompatibility = JavaVersion.VERSION_17
25 | }
26 |
27 | compileJava {
28 | sourceCompatibility = JavaVersion.VERSION_17
29 | targetCompatibility = JavaVersion.VERSION_17
30 | options.release = 17
31 | }
32 |
--------------------------------------------------------------------------------
/micrometer-jetty12/src/main/java/io/micrometer/jetty12/client/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2024 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Instrumentation for Jetty 12 client.
19 | */
20 | @NullMarked
21 | package io.micrometer.jetty12.client;
22 |
23 | import org.jspecify.annotations.NullMarked;
24 |
--------------------------------------------------------------------------------
/micrometer-jetty12/src/main/java/io/micrometer/jetty12/server/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2024 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Instrumentation for Jetty 12 server.
19 | */
20 | @NullMarked
21 | package io.micrometer.jetty12.server;
22 |
23 | import org.jspecify.annotations.NullMarked;
24 |
--------------------------------------------------------------------------------
/micrometer-observation-test/build.gradle:
--------------------------------------------------------------------------------
1 | description 'Test compatibility kit for extensions of Micrometer Observation'
2 |
3 | dependencies {
4 | api project(':micrometer-observation')
5 |
6 | api libs.assertj
7 | implementation platform(libs.junitBom)
8 | implementation libs.junitJupiter
9 |
10 | implementation libs.mockitoCore4
11 |
12 | testImplementation libs.awaitility
13 | }
14 |
--------------------------------------------------------------------------------
/micrometer-observation-test/src/main/java/io/micrometer/observation/tck/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NonNullApi
17 | @NonNullFields
18 | package io.micrometer.observation.tck;
19 |
20 | import io.micrometer.common.lang.NonNullApi;
21 | import io.micrometer.common.lang.NonNullFields;
22 |
--------------------------------------------------------------------------------
/micrometer-observation-test/src/test/java/io/micrometer/observation/tck/ObservationRegistryCompatibilityKitTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.observation.tck;
17 |
18 | import io.micrometer.observation.ObservationRegistry;
19 |
20 | class ObservationRegistryCompatibilityKitTests extends ObservationRegistryCompatibilityKit {
21 |
22 | @Override
23 | public ObservationRegistry registry() {
24 | return ObservationRegistry.create();
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/micrometer-observation/src/main/java/io/micrometer/observation/GlobalObservationConvention.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.observation;
17 |
18 | /**
19 | * An observation convention that will be set on the {@link ObservationRegistry}.
20 | *
21 | * @author Marcin Grzejszczak
22 | * @since 1.10.0
23 | */
24 | public interface GlobalObservationConvention extends ObservationConvention {
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/micrometer-observation/src/main/java/io/micrometer/observation/KeyValuesConvention.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.observation;
17 |
18 | import io.micrometer.common.KeyValues;
19 |
20 | /**
21 | * A marker interface for conventions of {@link KeyValues} naming.
22 | *
23 | * @author Marcin Grzejszczak
24 | * @since 1.10.0
25 | */
26 | public interface KeyValuesConvention {
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/micrometer-observation/src/main/java/io/micrometer/observation/annotation/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.observation.annotation;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/micrometer-observation/src/main/java/io/micrometer/observation/aop/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.observation.aop;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/micrometer-observation/src/main/java/io/micrometer/observation/contextpropagation/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.observation.contextpropagation;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/micrometer-observation/src/main/java/io/micrometer/observation/docs/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.observation.docs;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/micrometer-observation/src/main/java/io/micrometer/observation/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.observation;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/micrometer-observation/src/main/java/io/micrometer/observation/transport/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.observation.transport;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/micrometer-observation/src/main/resources/META-INF/services/io.micrometer.context.ThreadLocalAccessor:
--------------------------------------------------------------------------------
1 | io.micrometer.observation.contextpropagation.ObservationThreadLocalAccessor
2 |
--------------------------------------------------------------------------------
/micrometer-observation/src/test/java/io/micrometer/observation/aop/ObservedAspectTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.observation.aop;
17 |
18 | /**
19 | * {@link ObservedAspect} tests have been moved to the module
20 | * micrometer-samples-spring-framework6 to test with the current version of Spring that
21 | * requires JDK 17+.
22 | */
23 | class ObservedAspectTests {
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/micrometer-osgi-test/test.bndrun:
--------------------------------------------------------------------------------
1 | -tester: biz.aQute.tester.junit-platform
2 | -runfw: org.apache.felix.framework;
3 | -runee: ${project.osgiRunee}
4 | -runtrace: false
5 |
6 | #uncomment to remote debug
7 | # -runjdb: 5005
8 |
9 | -runrequires: \
10 | bnd.identity;id='micrometer-osgi-test-tests',\
11 | bnd.identity;id='junit-jupiter-engine',\
12 | bnd.identity;id='junit-platform-launcher'
13 |
14 | -runstartlevel: \
15 | order=sortbynameversion,\
16 | begin=-1
17 |
18 | -runproperties: \
19 | org.osgi.framework.bsnversion=multiple
20 |
--------------------------------------------------------------------------------
/micrometer-test-aspectj-ctw/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | alias(libs.plugins.aspectj)
4 | }
5 |
6 | description 'AspectJ compile-time weaving test for Micrometer aspects'
7 |
8 | if (!javaLanguageVersion.canCompileOrRun(17)) {
9 | repositories {
10 | maven { url 'https://repo.spring.io/snapshot' }
11 | }
12 | }
13 |
14 | dependencies {
15 | if (javaLanguageVersion.canCompileOrRun(17)) {
16 | aspect project(':micrometer-core')
17 | implementation libs.aspectjrt
18 | }
19 | else {
20 | // Use the latest Micrometer SNAPSHOT (built with Java 17+)
21 | // and the latest AspectJ that supports Java versions before 17
22 | aspect 'io.micrometer:micrometer-core:latest.integration'
23 | implementation 'org.aspectj:aspectjrt:1.9.20.1'
24 | }
25 |
26 | testImplementation libs.assertj
27 | }
28 |
29 | test {
30 | useJUnitPlatform()
31 | }
32 |
--------------------------------------------------------------------------------
/micrometer-test-aspectj-ctw/src/main/java/io/micrometer/test/ctw/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2024 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.test.ctw;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/micrometer-test-aspectj-ltw/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | }
4 |
5 | description 'AspectJ load-time weaving test for Micrometer aspects'
6 |
7 | configurations {
8 | agents
9 | }
10 |
11 | dependencies {
12 | agents libs.aspectjweaver
13 | implementation project(':micrometer-core')
14 | implementation project(':micrometer-observation')
15 |
16 | testImplementation libs.assertj
17 | }
18 |
19 | test {
20 | useJUnitPlatform()
21 | jvmArgs '-javaagent:' + configurations.agents.files.find { it.name.startsWith('aspectjweaver') },
22 | // needed for Java 16+, until upgrading to AspectJ 1.9.21.1, see https://github.com/eclipse-aspectj/aspectj/blob/master/docs/release/README-1.9.20.adoc#use-ltw-on-java-16
23 | '--add-opens=java.base/java.lang=ALL-UNNAMED'
24 | }
25 |
--------------------------------------------------------------------------------
/micrometer-test-aspectj-ltw/src/main/java/io/micrometer/test/ltw/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2024 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.test.ltw;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/micrometer-test/src/main/java/io/micrometer/common/util/internal/logging/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.common.util.internal.logging;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/micrometer-test/src/main/java/io/micrometer/core/instrument/binder/cache/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support for testing cache meter binders.
19 | */
20 | package io.micrometer.core.instrument.binder.cache;
21 |
--------------------------------------------------------------------------------
/micrometer-test/src/main/java/io/micrometer/core/instrument/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.core.instrument;
17 |
--------------------------------------------------------------------------------
/micrometer-test/src/main/java/io/micrometer/core/instrument/step/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2023 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.core.instrument.step;
17 |
--------------------------------------------------------------------------------
/micrometer-test/src/main/java/io/micrometer/core/ipc/http/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support for testing {@link io.micrometer.core.ipc.http.HttpSender HttpSender classes}.
19 | */
20 | package io.micrometer.core.ipc.http;
21 |
--------------------------------------------------------------------------------
/micrometer-test/src/main/java/io/micrometer/core/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support for testing.
19 | */
20 | package io.micrometer.core;
21 |
--------------------------------------------------------------------------------
/micrometer-test/src/main/java/io/micrometer/core/tck/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * TCK for {@link io.micrometer.core.instrument.MeterRegistry MeterRegistry classes}.
19 | */
20 | package io.micrometer.core.tck;
21 |
--------------------------------------------------------------------------------
/micrometer-test/src/main/java/io/micrometer/core/util/internal/logging/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support for testing internal logging.
19 | */
20 | package io.micrometer.core.util.internal.logging;
21 |
--------------------------------------------------------------------------------
/micrometer-test/src/test/java/io/micrometer/core/ipc/http/HttpUrlConnectionSenderTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.core.ipc.http;
17 |
18 | class HttpUrlConnectionSenderTest extends HttpSenderCompatibilityKit {
19 |
20 | @Override
21 | public HttpSender httpClient() {
22 | return new HttpUrlConnectionSender();
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/micrometer-test/src/test/java/io/micrometer/core/ipc/http/OkHttpSenderTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.micrometer.core.ipc.http;
17 |
18 | class OkHttpSenderTest extends HttpSenderCompatibilityKit {
19 |
20 | @Override
21 | public HttpSender httpClient() {
22 | return new OkHttpSender();
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/samples/micrometer-samples-core/src/main/java/io/micrometer/core/samples/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.core.samples;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/samples/micrometer-samples-core/src/main/java/io/micrometer/core/samples/utils/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 VMware, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @NullMarked
17 | package io.micrometer.core.samples.utils;
18 |
19 | import org.jspecify.annotations.NullMarked;
20 |
--------------------------------------------------------------------------------
/samples/micrometer-samples-hazelcast/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | }
4 |
5 | dependencies {
6 | implementation project(':micrometer-core')
7 | implementation libs.hazelcast
8 | implementation libs.logback12
9 | }
10 |
--------------------------------------------------------------------------------
/samples/micrometer-samples-javalin/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | }
4 |
5 | dependencies {
6 | implementation project(":micrometer-core")
7 | implementation project(":micrometer-registry-prometheus-simpleclient")
8 | implementation project(":micrometer-jetty11")
9 |
10 | implementation libs.javalin
11 | implementation libs.logback12
12 | }
13 |
14 | java {
15 | targetCompatibility = JavaVersion.VERSION_11
16 | }
17 |
18 | compileJava {
19 | sourceCompatibility = JavaVersion.VERSION_11
20 | targetCompatibility = JavaVersion.VERSION_11
21 | options.release = 11
22 | }
23 |
--------------------------------------------------------------------------------
/samples/micrometer-samples-jersey3/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | }
4 |
5 | dependencies {
6 | implementation project(":micrometer-core")
7 |
8 | // Test sample project with SLFJ4 2.x / Logback; see gh-3415
9 | runtimeOnly(libs.logbackLatest)
10 |
11 | implementation libs.jersey3ContainerJdkHttp
12 | runtimeOnly libs.jersey3Hk2
13 |
14 | testImplementation libs.jersey3TestFrameworkJdkHttp
15 | testImplementation libs.junitJupiter
16 | testRuntimeOnly libs.junitPlatformLauncher
17 | testImplementation libs.assertj
18 | testImplementation libs.awaitility
19 | }
20 |
--------------------------------------------------------------------------------
/samples/micrometer-samples-jooq/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | }
4 |
5 | // Latest open source jOOQ versions only support Java 21+
6 | // skip this module when building with jdk <21
7 | if (!javaLanguageVersion.canCompileOrRun(21)) {
8 | project.tasks.configureEach { task -> task.enabled = false }
9 | }
10 |
11 | dependencies {
12 | implementation project(":micrometer-core")
13 | implementation libs.jooqLatest
14 |
15 | testImplementation platform(libs.junitBom)
16 | testImplementation libs.junitJupiter
17 | testRuntimeOnly libs.junitPlatformLauncher
18 | testImplementation libs.assertj
19 | testImplementation libs.mockitoCore5
20 |
21 | testRuntimeOnly libs.h2
22 | }
23 |
24 | java {
25 | targetCompatibility = JavaVersion.VERSION_21
26 | }
27 |
28 | compileJava {
29 | sourceCompatibility = JavaVersion.VERSION_21
30 | targetCompatibility = JavaVersion.VERSION_21
31 | options.release = 21
32 | }
33 |
--------------------------------------------------------------------------------
/samples/micrometer-samples-kotlin/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | // test with the lowest version of Kotlin supported because we compile with highest version supported
3 | alias(libs.plugins.kotlin17)
4 | }
5 |
6 | tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
7 | kotlinOptions {
8 | jvmTarget = javaTargetVersion
9 | apiVersion = "1.7"
10 | languageVersion = "1.7"
11 | }
12 | }
13 |
14 | dependencies {
15 | // libraries that have Kotlin dependencies
16 | implementation project(":micrometer-core")
17 | implementation libs.kotlinxCoroutines
18 | // force the stdlib versions to match the plugin version for this sample
19 | implementation enforcedPlatform('org.jetbrains.kotlin:kotlin-bom')
20 | implementation libs.okhttp
21 |
22 | testRuntimeOnly libs.contextPropagation
23 |
24 | testImplementation project(":micrometer-test")
25 |
26 | testImplementation platform(libs.junitBom)
27 | testRuntimeOnly platform(libs.junitBom)
28 | testImplementation libs.junitJupiter
29 | testRuntimeOnly libs.junitPlatformLauncher
30 | }
31 |
--------------------------------------------------------------------------------
/scripts/.gitignore:
--------------------------------------------------------------------------------
1 | .atlas/
2 | .ganglia/
3 | .telegraf/
4 | sync-to-maven-central-dont-commit.sh
--------------------------------------------------------------------------------
/scripts/README.md:
--------------------------------------------------------------------------------
1 | ## Running Atlas locally
2 |
3 | Run `./atlas.sh`. To tweak the local server's settings, make modifications
4 | to `.atlas/memory.conf`.
5 |
6 | ## Running Ganglia locally
7 |
8 | Run `./ganglia.sh`.
9 |
10 | ## Running Prometheus/Grafana locally
11 |
12 | Configure a loopback Alias so Prometheus can scrape a service running on localhost
13 | and grafana can contact Prometheus (needs to be repeated after reboot):
14 |
15 | `sudo ifconfig lo0 alias 10.200.10.1/24`
16 |
17 | Start Prometheus:
18 |
19 | `docker run -p 9090:9090 -v ~/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus`
20 |
21 | Start Grafana:
22 |
23 | `docker run -i -p 3000:3000 grafana/grafana`
--------------------------------------------------------------------------------
/scripts/atlas.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ATLAS_VERSION=1.5.3
4 |
5 | if [ ! -f .atlas/memory.conf ]; then
6 | echo "Downloading Atlas in-memory configuration"
7 | mkdir .atlas
8 | curl -Lo .atlas/memory.conf https://raw.githubusercontent.com/Netflix/atlas/v1.5.x/conf/memory.conf
9 | fi
10 |
11 | if [ ! -f .atlas/atlas-$ATLAS_VERSION-standalone.jar ]; then
12 | echo "Downloading Atlas $ATLAS_VERSION standalone"
13 | curl -Lo .atlas/atlas-$ATLAS_VERSION-standalone.jar https://github.com/Netflix/atlas/releases/download/v$ATLAS_VERSION/atlas-$ATLAS_VERSION-standalone.jar
14 | fi
15 |
16 | java -jar .atlas/atlas-$ATLAS_VERSION-standalone.jar .atlas/memory.conf
--------------------------------------------------------------------------------
/scripts/cassandra.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | docker run --name my_cassandra -e "CASSANDRA_START_RPC=true" cassandra
--------------------------------------------------------------------------------
/scripts/cpu.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | htop -p $(ps ax | grep '[m]icrometer-core' | awk '{print $1}')
--------------------------------------------------------------------------------
/scripts/elastic.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | docker run -d -p 9200:9200 -p 5601:5601 nshou/elasticsearch-kibana
--------------------------------------------------------------------------------
/scripts/ganglia.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | if [ ! -f .ganglia ]; then
4 | mkdir -p .ganglia/etc
5 | mkdir -p .ganglia/data
6 | fi
7 |
8 | rm -r $(pwd)/.ganglia
9 |
10 | docker run \
11 | -v $(pwd)/.ganglia/etc:/etc/ganglia \
12 | -v $(pwd)/.ganglia/data:/var/lib/ganglia \
13 | -p 8089:80 \
14 | -p 8649:8649 \
15 | -p 8649:8649/udp \
16 | kurthuwig/ganglia:latest
--------------------------------------------------------------------------------
/scripts/go-graphite.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | docker run -d\
4 | -p 2003-2004:2003-2004\
5 | -p 2003:2003/udp\
6 | -p 7002:7002\
7 | -p 7007:7007\
8 | bodsch/docker-go-carbon
9 |
--------------------------------------------------------------------------------
/scripts/grafana-datasource.yml:
--------------------------------------------------------------------------------
1 | apiVersion: 1
2 |
3 | datasources:
4 | - name: prometheus
5 | type: prometheus
6 | access: direct
7 | url: http://10.200.10.1:9090
8 | isDefault: true
9 |
--------------------------------------------------------------------------------
/scripts/grafana.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | docker run -i -p 3000:3000 \
3 | -v $(pwd)/grafana-datasource.yml:/etc/grafana/provisioning/datasources/grafana-datasource.yml \
4 | grafana/grafana:6.7.2
5 |
--------------------------------------------------------------------------------
/scripts/graphite.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | docker run -d\
4 | -p 8081:80\
5 | -p 2003-2004:2003-2004\
6 | -p 2023-2024:2023-2024\
7 | -p 8125:8125/udp\
8 | -p 8126:8126\
9 | graphiteapp/graphite-statsd
--------------------------------------------------------------------------------
/scripts/influx.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # assumes influxdb has been brew installed on OSX
4 | influxd -config /usr/local/etc/influxdb.conf
--------------------------------------------------------------------------------
/scripts/kairosdb.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | docker run --link my_cassandra:cassandra -e "CASSANDRA_HOST_LIST=cassandra:9160" -p 8083:8083 jimtonic/kairosdb
3 |
--------------------------------------------------------------------------------
/scripts/newrelic/.gitignore:
--------------------------------------------------------------------------------
1 | newrelic.yml
2 | logs/
--------------------------------------------------------------------------------
/scripts/newrelic/newrelic.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/micrometer-metrics/micrometer/b2a4866940f035465704ee9d571478800fb7b9b7/scripts/newrelic/newrelic.jar
--------------------------------------------------------------------------------
/scripts/prometheus.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | docker run -p 9090:9090 \
3 | -v $(pwd)/prometheus.yml:/etc/prometheus/prometheus.yml \
4 | prom/prometheus:v2.17.1
5 |
--------------------------------------------------------------------------------
/scripts/prometheus.yml:
--------------------------------------------------------------------------------
1 | global:
2 | scrape_interval: 5s
3 |
4 | scrape_configs:
5 | - job_name: 'prometheus'
6 |
7 | static_configs:
8 | - targets: ['localhost:9090']
9 |
10 | - job_name: 'spring-boot2'
11 |
12 | metrics_path: '/actuator/prometheus'
13 | static_configs:
14 | - targets: ['10.200.10.1:8080']
15 |
16 | rule_files:
17 | - prometheus_rules.yml
18 |
--------------------------------------------------------------------------------
/scripts/spring-dash/grafana-dashboard.yml:
--------------------------------------------------------------------------------
1 | apiVersion: 1
2 |
3 | providers:
4 | - name: 'default'
5 | folder: 'Spring Boot'
6 | type: file
7 | options:
8 | path: /etc/grafana/dashboards
9 |
--------------------------------------------------------------------------------
/scripts/spring-dash/grafana-datasource.yml:
--------------------------------------------------------------------------------
1 | apiVersion: 1
2 |
3 | datasources:
4 | - name: prometheus
5 | type: prometheus
6 | access: direct
7 | url: http://10.200.10.1:9090
8 |
--------------------------------------------------------------------------------
/scripts/spring-dash/grafana.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | docker run -i -p 3000:3000 \
3 | -v $(pwd)/grafana-datasource.yml:/etc/grafana/provisioning/datasources/grafana-datasource.yml \
4 | -v $(pwd)/grafana-dashboard.yml:/etc/grafana/provisioning/dashboards/grafana-dashboard.yml \
5 | -v $(pwd)/jvmgc-dashboard.json:/etc/grafana/dashboards/jvmgc.json \
6 | -v $(pwd)/latency-dashboard.json:/etc/grafana/dashboards/latency.json \
7 | -v $(pwd)/processor-dashboard.json:/etc/grafana/dashboards/processor.json \
8 | grafana/grafana:5.1.0
9 |
10 |
--------------------------------------------------------------------------------
/scripts/spring-dash/prometheus.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | echo "##################################################"
3 | echo "# IMPORTANT: Once per operating system restart, you must run 'sudo ifconfig lo0 alias 10.200.10.1/24' to allow Prometheus to scrape targets on the host"
4 | echo "##################################################"
5 | docker run -p 9090:9090 \
6 | -v $(pwd)/prometheus.yml:/etc/prometheus/prometheus.yml \
7 | prom/prometheus:v2.2.0
8 |
--------------------------------------------------------------------------------
/scripts/spring-dash/prometheus.yml:
--------------------------------------------------------------------------------
1 | global:
2 | scrape_interval: 5s
3 | scrape_configs:
4 | - job_name: 'prometheus'
5 | static_configs:
6 | - targets: ['localhost:9090']
7 | - job_name: 'spring-boot-2'
8 | metrics_path: '/actuator/prometheus'
9 | static_configs:
10 | - targets: ['10.200.10.1:8080']
11 | - job_name: 'spring-boot'
12 | metrics_path: '/prometheus'
13 | static_configs:
14 | - targets: ['10.200.10.1:8080']
15 |
--------------------------------------------------------------------------------
/scripts/statsd-datadog.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | if [ $# -eq 0 ]
4 | then
5 | echo "Supply a datadog API key as an argument to this script"
6 | fi
7 |
8 | docker run --name dd-agent \
9 | -v /var/run/docker.sock:/var/run/docker.sock:ro \
10 | -v /proc/:/host/proc/:ro \
11 | -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
12 | -e DD_API_KEY=$1 \
13 | -e DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true \
14 | -p 8125:8125/udp \
15 | datadog/agent:latest
--------------------------------------------------------------------------------
/scripts/statsd-telegraf.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | if [ ! -f .telegraf/tele.conf ]; then
4 | echo "Initializing the telegraf config. If you need to point to an influx instance not on localhost, modify ./telegraf/tele.conf"
5 | mkdir .telegraf
6 | telegraf --input-filter statsd --output-filter influxdb config > ./.telegraf/tele.conf
7 | fi
8 |
9 | telegraf -config ./.telegraf/tele.conf
--------------------------------------------------------------------------------