Start building against Micrometer 1.9.0-M4 snapshots

Micrometer duplicated the binders in a separate module named
micrometer-binders, and marked the binders in the core module as
deprecated. This commit changes the imports to use the new binders in
the micrometer-binders module. Additionally, the auto-configurations
honor user-supplied beans which use the old binders in the
micrometer-core module.

See gh-30014
This commit is contained in:
Moritz Halbritter
2022-02-24 15:59:59 +01:00
parent 74726bddcf
commit 7897a913a7
55 changed files with 810 additions and 176 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,8 +17,8 @@
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.command;
import com.mongodb.event.CommandEvent;
import io.micrometer.binder.mongodb.MongoCommandTagsProvider;
import io.micrometer.core.instrument.Tag;
import io.micrometer.core.instrument.binder.mongodb.MongoCommandTagsProvider;
class CustomCommandTagsProvider implements MongoCommandTagsProvider {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.command;
import io.micrometer.core.instrument.binder.mongodb.MongoCommandTagsProvider;
import io.micrometer.binder.mongodb.MongoCommandTagsProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,8 +17,8 @@
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.connectionpool;
import com.mongodb.event.ConnectionPoolCreatedEvent;
import io.micrometer.binder.mongodb.MongoConnectionPoolTagsProvider;
import io.micrometer.core.instrument.Tag;
import io.micrometer.core.instrument.binder.mongodb.MongoConnectionPoolTagsProvider;
public class CustomConnectionPoolTagsProvider implements MongoConnectionPoolTagsProvider {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.connectionpool;
import io.micrometer.core.instrument.binder.mongodb.MongoConnectionPoolTagsProvider;
import io.micrometer.binder.mongodb.MongoConnectionPoolTagsProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@@ -17,8 +17,8 @@
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.command
import com.mongodb.event.CommandEvent
import io.micrometer.binder.mongodb.MongoCommandTagsProvider
import io.micrometer.core.instrument.Tag
import io.micrometer.core.instrument.binder.mongodb.MongoCommandTagsProvider
class CustomCommandTagsProvider : MongoCommandTagsProvider {
@@ -26,4 +26,4 @@ class CustomCommandTagsProvider : MongoCommandTagsProvider {
return emptyList()
}
}
}

View File

@@ -16,7 +16,7 @@
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.command
import io.micrometer.core.instrument.binder.mongodb.MongoCommandTagsProvider
import io.micrometer.binder.mongodb.MongoCommandTagsProvider
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
@@ -28,4 +28,4 @@ class MyCommandTagsProviderConfiguration {
return CustomCommandTagsProvider()
}
}
}

View File

@@ -17,8 +17,8 @@
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.connectionpool
import com.mongodb.event.ConnectionPoolCreatedEvent
import io.micrometer.binder.mongodb.MongoConnectionPoolTagsProvider
import io.micrometer.core.instrument.Tag
import io.micrometer.core.instrument.binder.mongodb.MongoConnectionPoolTagsProvider
class CustomConnectionPoolTagsProvider : MongoConnectionPoolTagsProvider {
@@ -26,4 +26,4 @@ class CustomConnectionPoolTagsProvider : MongoConnectionPoolTagsProvider {
return emptyList()
}
}
}

View File

@@ -16,7 +16,7 @@
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.connectionpool
import io.micrometer.core.instrument.binder.mongodb.MongoConnectionPoolTagsProvider
import io.micrometer.binder.mongodb.MongoConnectionPoolTagsProvider
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
@@ -28,4 +28,4 @@ class MyConnectionPoolTagsProviderConfiguration {
return CustomConnectionPoolTagsProvider()
}
}
}