Monitor Search and SLO History not updated to handle breaking changes
gsdatta opened this issue · comments
Ganesh Datta commented
Describe the bug
- The SLO History API "data.overall.precision" field is sometimes being returned as a single float value instead of a map as defined in the spec
com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.util.LinkedHashMap<java.lang.String,java.lang.Double>` out of VALUE_NUMBER_FLOAT token at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 2869] (through reference chain: com.datadog.api.v1.client.model.SLOHistoryResponse["data"]->com.datadog.api.v1.client.model.SLOHistoryResponseData["monitors"]->java.util.ArrayList[0]->com.datadog.api.v1.client.model.SLOHistorySLIData["precision"])
- The Monitor Search API "monitors.type" field is returning "metric-slo alert", which isn't defined in the spec.
com.fasterxml.jackson.databind.exc.ValueInstantiationException: Cannot construct instance of `com.datadog.api.v1.client.model.MonitorType`, problem: Unexpected value 'metric-slo alert' at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 5302] (through reference chain: com.datadog.api.v1.client.model.MonitorSearchResponse["monitors"]->java.util.ArrayList[3]->com.datadog.api.v1.client.model.MonitorSearchResult["type"])
Both of these result the SDK throwing a javax.ws.rs.ProcessingException
.
To Reproduce
Have opened a ticket here https://help.datadoghq.com/hc/en-us/requests/574449. Not sure how to recreate, but I've added example IDs in the ticket.
Expected behavior
The SDK processes these correctly.
MonitorType
is missing typemetric-slo alert
SLOHistorySLIData
handles the fact that the API sometimes returns an object instead of a
Environment and Versions (please complete the following information):
Version 1.2 of the SDK
Additional context
This issue has been going on for months and looks to be that the SDK hasn't been updated to reflect changes that are already in production.
Thomas Hervé commented
I believe this was handled with support, let us know if there are remaining issues. Thanks.