Fix traces actuator should return json by default (#1997)

Fixes gh-1996

Change order of TextOutputFormat enum and give `CONTENT_TYPE_OPENZIPKIN_JSON_V2`
highest ordinal value, so that it will be matched first by spring-boot-actuator
and in case of default Accept header JSON data will be returned.
This commit is contained in:
Chintan Radia
2021-07-15 13:27:12 +05:30
committed by Marcin Grzejszczak
parent a1a2e7fe50
commit 7651e7c51f

View File

@@ -28,15 +28,15 @@ import org.springframework.util.MimeType;
*/
public enum TextOutputFormat implements Producible<TextOutputFormat> {
/**
* OpenZipkin text.
*/
CONTENT_TYPE_OPENZIPKIN_JSON_V2(MediaType.APPLICATION_JSON),
/**
* OTLP protobuf format.
*/
CONTENT_TYPE_OTLP_PROTOBUF(MediaType.parseMediaType("application/x-protobuf"));
CONTENT_TYPE_OTLP_PROTOBUF(MediaType.parseMediaType("application/x-protobuf")),
/**
* OpenZipkin text.
*/
CONTENT_TYPE_OPENZIPKIN_JSON_V2(MediaType.APPLICATION_JSON);
private final MimeType mimeType;