From 13533270bb8498fce76a3d7b685b1a0f6d057d71 Mon Sep 17 00:00:00 2001 From: FrancescoFioraEst Date: Tue, 24 Aug 2021 12:55:16 +0100 Subject: Export basic prometheus metrics from clamp POLICY-3557: Export basic prometheus metrics from clamp Change-Id: Ica71d089255e2a8881f668ceeb578993996f9a38 Signed-off-by: FrancescoFioraEst --- .../clamp/controlloop/runtime/config/ConverterConfiguration.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'runtime-controlloop/src/main/java/org') diff --git a/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/config/ConverterConfiguration.java b/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/config/ConverterConfiguration.java index ee0461994..b14c675df 100644 --- a/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/config/ConverterConfiguration.java +++ b/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/config/ConverterConfiguration.java @@ -20,9 +20,12 @@ package org.onap.policy.clamp.controlloop.runtime.config; +import java.util.Arrays; import java.util.List; import org.springframework.context.annotation.Configuration; +import org.springframework.http.MediaType; import org.springframework.http.converter.HttpMessageConverter; +import org.springframework.http.converter.StringHttpMessageConverter; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @Configuration @@ -32,5 +35,9 @@ public class ConverterConfiguration implements WebMvcConfigurer { public void extendMessageConverters(List> converters) { converters.add(new CoderHttpMesageConverter<>("yaml")); converters.add(new CoderHttpMesageConverter<>("json")); + + StringHttpMessageConverter converter = new StringHttpMessageConverter(); + converter.setSupportedMediaTypes(Arrays.asList(MediaType.TEXT_PLAIN)); + converters.add(converter); } } -- cgit 1.2.3-korg