Skip to content

Commit b198c5b

Browse files
committed
Revert Micrometer Upgrade to M2
Resolves #2126 This reverts commit f51ddd4.
1 parent 10e310c commit b198c5b

File tree

9 files changed

+31
-32
lines changed

9 files changed

+31
-32
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ ext {
6666
junitJupiterVersion = '5.8.2'
6767
kafkaVersion = '3.1.0'
6868
log4jVersion = '2.17.1'
69-
micrometerVersion = '2.0.0-M2'
69+
micrometerVersion = '2.0.0-M1'
7070
mockitoVersion = '4.0.0'
7171
reactorVersion = '2020.0.16'
7272
scalaVersion = '2.13'

spring-kafka/src/main/java/org/springframework/kafka/core/MicrometerConsumerListener.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,9 +24,9 @@
2424

2525
import org.apache.kafka.clients.consumer.Consumer;
2626

27-
import io.micrometer.api.instrument.ImmutableTag;
28-
import io.micrometer.api.instrument.MeterRegistry;
29-
import io.micrometer.api.instrument.Tag;
27+
import io.micrometer.core.instrument.ImmutableTag;
28+
import io.micrometer.core.instrument.MeterRegistry;
29+
import io.micrometer.core.instrument.Tag;
3030
import io.micrometer.core.instrument.binder.kafka.KafkaClientMetrics;
3131

3232
/**

spring-kafka/src/main/java/org/springframework/kafka/core/MicrometerProducerListener.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,9 +24,9 @@
2424

2525
import org.apache.kafka.clients.producer.Producer;
2626

27-
import io.micrometer.api.instrument.ImmutableTag;
28-
import io.micrometer.api.instrument.MeterRegistry;
29-
import io.micrometer.api.instrument.Tag;
27+
import io.micrometer.core.instrument.ImmutableTag;
28+
import io.micrometer.core.instrument.MeterRegistry;
29+
import io.micrometer.core.instrument.Tag;
3030
import io.micrometer.core.instrument.binder.kafka.KafkaClientMetrics;
3131

3232
/**

spring-kafka/src/main/java/org/springframework/kafka/streams/KafkaStreamsMicrometerListener.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,9 +26,9 @@
2626

2727
import org.springframework.kafka.config.StreamsBuilderFactoryBean;
2828

29-
import io.micrometer.api.instrument.ImmutableTag;
30-
import io.micrometer.api.instrument.MeterRegistry;
31-
import io.micrometer.api.instrument.Tag;
29+
import io.micrometer.core.instrument.ImmutableTag;
30+
import io.micrometer.core.instrument.MeterRegistry;
31+
import io.micrometer.core.instrument.Tag;
3232
import io.micrometer.core.instrument.binder.kafka.KafkaStreamsMetrics;
3333

3434
/**

spring-kafka/src/main/java/org/springframework/kafka/support/KafkaUtils.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2022 the original author or authors.
2+
* Copyright 2018-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -42,7 +42,7 @@ public final class KafkaUtils {
4242
* True if micrometer is on the class path.
4343
*/
4444
public static final boolean MICROMETER_PRESENT = ClassUtils.isPresent(
45-
"io.micrometer.api.instrument.MeterRegistry", KafkaUtils.class.getClassLoader());
45+
"io.micrometer.core.instrument.MeterRegistry", KafkaUtils.class.getClassLoader());
4646

4747
private static final ThreadLocal<String> GROUP_IDS = new ThreadLocal<>();
4848

spring-kafka/src/main/java/org/springframework/kafka/support/micrometer/MicrometerHolder.java

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,11 +22,10 @@
2222
import org.springframework.context.ApplicationContext;
2323
import org.springframework.lang.Nullable;
2424

25-
import io.micrometer.api.instrument.MeterRegistry;
26-
import io.micrometer.api.instrument.Timer;
27-
import io.micrometer.api.instrument.Timer.Builder;
28-
import io.micrometer.api.instrument.Timer.Sample;
29-
25+
import io.micrometer.core.instrument.MeterRegistry;
26+
import io.micrometer.core.instrument.Timer;
27+
import io.micrometer.core.instrument.Timer.Builder;
28+
import io.micrometer.core.instrument.Timer.Sample;
3029

3130
/**
3231
* A wrapper for micrometer timers when available on the class path.

spring-kafka/src/test/java/org/springframework/kafka/annotation/EnableKafkaIntegrationTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@
156156
import org.springframework.validation.Errors;
157157
import org.springframework.validation.Validator;
158158

159-
import io.micrometer.api.instrument.ImmutableTag;
160-
import io.micrometer.api.instrument.MeterRegistry;
161-
import io.micrometer.api.instrument.simple.SimpleMeterRegistry;
159+
import io.micrometer.core.instrument.ImmutableTag;
160+
import io.micrometer.core.instrument.MeterRegistry;
161+
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
162162

163163
/**
164164
* @author Gary Russell

spring-kafka/src/test/java/org/springframework/kafka/config/KafkaStreamsCustomizerTests.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2022 the original author or authors.
2+
* Copyright 2018-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -51,9 +51,9 @@
5151
import org.springframework.test.annotation.DirtiesContext;
5252
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
5353

54-
import io.micrometer.api.instrument.ImmutableTag;
55-
import io.micrometer.api.instrument.MeterRegistry;
56-
import io.micrometer.api.instrument.simple.SimpleMeterRegistry;
54+
import io.micrometer.core.instrument.ImmutableTag;
55+
import io.micrometer.core.instrument.MeterRegistry;
56+
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
5757

5858
/**
5959
* @author Nurettin Yilmaz

spring-kafka/src/test/java/org/springframework/kafka/support/micrometer/MicrometerHolderTests.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,9 +33,9 @@
3333
import org.springframework.context.ApplicationContext;
3434
import org.springframework.test.util.ReflectionTestUtils;
3535

36-
import io.micrometer.api.instrument.MeterRegistry;
37-
import io.micrometer.api.instrument.Timer;
38-
import io.micrometer.api.instrument.simple.SimpleMeterRegistry;
36+
import io.micrometer.core.instrument.MeterRegistry;
37+
import io.micrometer.core.instrument.Timer;
38+
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
3939

4040
/**
4141
* @author Vasyl Sarzhynskyi

0 commit comments

Comments
 (0)