Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Commit

Permalink
Explicity include ServiceLevelObjectiveBoundary
Browse files Browse the repository at this point in the history
This triggers only if MetricsAutoConfiguration is active.

Closes gh-1538
  • Loading branch information
mhalbritter authored and sdeleuze committed Apr 1, 2022
1 parent 55816a8 commit afc0d75
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2019-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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.boot.actuate.autoconfigure.metrics;

import org.springframework.nativex.hint.NativeHint;
import org.springframework.nativex.hint.TypeHint;
import org.springframework.nativex.type.NativeConfiguration;

@NativeHint(trigger = MetricsAutoConfiguration.class, types = {
@TypeHint(types = {
org.springframework.boot.actuate.autoconfigure.metrics.ServiceLevelObjectiveBoundary.class
}, access = {})
})
public class MetricsAutoConfigurationHints implements NativeConfiguration {
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,16 @@
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.PropertiesConfigAdapter;
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimplePropertiesConfigAdapter;
import org.springframework.boot.actuate.metrics.MetricsEndpoint;
import org.springframework.nativex.hint.TypeAccess;
import org.springframework.nativex.hint.NativeHint;
import org.springframework.nativex.hint.TypeAccess;
import org.springframework.nativex.hint.TypeHint;
import org.springframework.nativex.type.NativeConfiguration;

// Hitting /metrics endpoint - needs tests
@NativeHint(trigger = MetricsEndpointAutoConfiguration.class, types = {
@TypeHint(types = {
PropertiesConfigAdapter.class,
SimplePropertiesConfigAdapter.class,
org.springframework.boot.actuate.autoconfigure.metrics.ServiceLevelObjectiveBoundary.class,
org.springframework.boot.actuate.autoconfigure.metrics.ServiceLevelObjectiveBoundary[].class,
SimplePropertiesConfigAdapter.class
}),
@TypeHint(types = {
MetricsEndpoint.class,
Expand All @@ -41,4 +39,4 @@
}, access = { TypeAccess.DECLARED_METHODS, TypeAccess.DECLARED_FIELDS})
})
public class MetricsEndpointAutoConfigurationHints implements NativeConfiguration {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ org.springframework.boot.actuate.autoconfigure.health.HealthEndpointAutoConfigur
org.springframework.boot.actuate.autoconfigure.info.InfoEndpointAutoConfigurationHints,\
org.springframework.boot.actuate.autoconfigure.jolokia.JolokiaEndpointAutoConfigurationHints,\
org.springframework.boot.actuate.autoconfigure.metrics.MetricsEndpointAutoConfigurationHints,\
org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfigurationHints,\
org.springframework.boot.actuate.autoconfigure.metrics.export.prometheus.PrometheusEndpointAutoConfigurationHints,\
org.springframework.boot.actuate.autoconfigure.startup.StartupEndpointAutoConfigurationHints,\
org.springframework.boot.actuate.autoconfigure.web.mappings.MappingsEndpointAutoConfigurationHints,\
Expand Down

0 comments on commit afc0d75

Please sign in to comment.