Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated micrometer.observations.annotations.enabled #44320

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ static final class ObservationAnnotationsEnabledCondition extends AnyNestedCondi
super(ConfigurationPhase.PARSE_CONFIGURATION);
}

@ConditionalOnBooleanProperty("micrometer.observations.annotations.enabled")
static class MicrometerObservationsEnabledCondition {

}

@ConditionalOnBooleanProperty("management.observations.annotations.enabled")
static class ManagementObservationsEnabledCondition {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,6 @@ static final class ObservationAnnotationsEnabledCondition extends AnyNestedCondi
super(ConfigurationPhase.PARSE_CONFIGURATION);
}

@ConditionalOnBooleanProperty("micrometer.observations.annotations.enabled")
static class MicrometerObservationsEnabledCondition {

}

@ConditionalOnBooleanProperty("management.observations.annotations.enabled")
static class ManagementObservationsEnabledCondition {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2247,14 +2247,6 @@
"name": "management.zipkin.tracing.export.enabled",
"type": "java.lang.Boolean",
"description": "Whether auto-configuration of tracing is enabled to export Zipkin traces."
},
{
"name": "micrometer.observations.annotations.enabled",
"type": "java.lang.Boolean",
"deprecation": {
"level": "error",
"replacement": "management.observations.annotations.enabled"
}
}
],
"hints": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,6 @@ void shouldNotConfigureAspectsByDefault() {
});
}

@Test
void shouldConfigureAspectsWithLegacyProperty() {
new ApplicationContextRunner().with(MetricsRun.simple())
.withConfiguration(AutoConfigurations.of(MetricsAspectsAutoConfiguration.class))
.withPropertyValues("micrometer.observations.annotations.enabled=true")
.run((context) -> {
assertThat(context).hasSingleBean(CountedAspect.class);
assertThat(context).hasSingleBean(TimedAspect.class);
});
}

@Test
void shouldConfigureAspects() {
this.contextRunner.run((context) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,18 +145,6 @@ void shouldNotSupplyAspectBeansIfPropertyIsDisabled() {
});
}

@Test
void shouldSupplyAspectBeansIfLegacyPropertyIsEnabled() {
new ApplicationContextRunner().withPropertyValues("micrometer.observations.annotations.enabled=true")
.withConfiguration(AutoConfigurations.of(MicrometerTracingAutoConfiguration.class))
.withUserConfiguration(TracerConfiguration.class, PropagatorConfiguration.class)
.run((context) -> {
assertThat(context).hasSingleBean(DefaultNewSpanParser.class);
assertThat(context).hasSingleBean(ImperativeMethodInvocationProcessor.class);
assertThat(context).hasSingleBean(SpanAspect.class);
});
}

@Test
void shouldNotSupplyBeansIfAspectjIsMissing() {
this.contextRunner.withUserConfiguration(TracerConfiguration.class)
Expand Down
Loading