Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Unreleased

### 🚫 Deprecations

- Deprecate `DeclarativeConfigPropertiesBridgeBuilder`. Read declarative component configuration
through `DeclarativeConfigProperties` directly. To expose `ConfigProperties` through the
declarative configuration API, use `ConfigPropertiesBackedConfigProvider`.

### 📈 Enhancements

- Add Cassandra JMX metrics target system.
Expand Down
6 changes: 6 additions & 0 deletions declarative-config-bridge/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Declarative Config Bridge

> [!WARNING]
> `DeclarativeConfigPropertiesBridgeBuilder` is deprecated and will be removed in 3.0. Read
> declarative component configuration through `DeclarativeConfigProperties` directly. To expose
> `ConfigProperties` through the declarative configuration API, use
> `ConfigPropertiesBackedConfigProvider`.

Declarative Config Bridge allows instrumentation authors to access configuration in a uniform way,
regardless of the configuration source.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@
* common:
* string_key: value
* </pre>
*
* @deprecated Migrate code that reads declarative component configuration to use {@link
* DeclarativeConfigProperties} directly. To expose {@link ConfigProperties} through the
* declarative configuration API, use {@link ConfigPropertiesBackedConfigProvider}. This class
* will be removed in 3.0.
*/
@Deprecated // will be removed in 3.0
final class DeclarativeConfigPropertiesBridge implements ConfigProperties {

private static final String OTEL_INSTRUMENTATION_PREFIX = "otel.instrumentation.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@
/**
* A builder for {@link DeclarativeConfigPropertiesBridge} that allows adding translations and fixed
* values for properties.
*
* @deprecated Use {@link DeclarativeConfigProperties} directly when reading declarative component
* configuration, or use {@link ConfigPropertiesBackedConfigProvider} when exposing a {@link
* io.opentelemetry.api.incubator.config.ConfigProvider} backed by {@link ConfigProperties}.
* This class will be removed in 3.0.
*/
@Deprecated // will be removed in 3.0
Comment thread
trask marked this conversation as resolved.
public class DeclarativeConfigPropertiesBridgeBuilder {
/**
* order is important here, so we use LinkedHashMap - see {@link #addMapping(String, String)} for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.junit.jupiter.api.Test;
import org.mockito.MockedStatic;

@SuppressWarnings("DoNotMockAutoValue")
@SuppressWarnings({"DoNotMockAutoValue", "deprecation"}) // testing deprecated bridge
class DeclarativeConfigPropertiesBridgeBuilderTest {
@Test
void shouldUseConfigPropertiesForAutoConfiguration() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

@SuppressWarnings("deprecation") // testing deprecated bridge
class DeclarativeConfigPropertiesBridgeTest {

private ConfigProperties bridge;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,11 @@ public OpenTelemetry openTelemetry(
* <p>Not using spring boot properties directly, because declarative configuration does not
* integrate with spring boot properties.
*
* @deprecated use the Declarative Config API instead.
* @deprecated Migrate consuming auto-configurations to the Declarative Config API. This
* compatibility bean will be removed in 3.0 together with {@link
* DeclarativeConfigPropertiesBridgeBuilder}.
*/
@Deprecated
@Deprecated // will be removed in 3.0
@Bean
public ConfigProperties otelProperties(OpenTelemetry openTelemetry) {
return new DeclarativeConfigPropertiesBridgeBuilder()
Expand Down
Loading