Skip to content

Commit 78a2623

Browse files
committed
force the content to be json string, it seems like it might be the
objects tostring
1 parent 1929cf5 commit 78a2623

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

IoTDBJDBC/src/main/java/com/oracle/demo/timg/iot/iotdbjdbc/messagehandler/outputs/http/normalizeddata/timeseriesdb/TimeSeriesDBOutputOTLP.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ public TimeSeriesDBOutputOTLP(DeviceModelInstancesCache deviceModelInstancesCach
8888
this.deviceModelInstancesCache = deviceModelInstancesCache;
8989
this.metricsClient = metricsClient;
9090
TimeSeriesEndpointsQueryParams queryParams = timeSeriesEndpointsRetriever.getQueryParams();
91+
log.info("Query params data is " + queryParams);
9192
this.queryX = queryParams.getMetricsQueryX();
9293
this.queryY = queryParams.getMetricsQueryY();
9394
this.mapper = mapper;
@@ -132,7 +133,7 @@ public NormalizedData[] processNormalizedData(NormalizedData normalizedData) thr
132133
+ ", queryY=" + queryY);
133134

134135
if (doUpload) {
135-
metricsClient.uploadMetrics(queryX, queryY, metricsData);
136+
metricsClient.uploadMetrics(queryX, queryY, metricsDataString);
136137
}
137138
return sentDataIsCompleted ? new NormalizedData[0] : new NormalizedData[] { normalizedData };
138139
}

IoTDBJDBC/src/main/java/com/oracle/demo/timg/iot/iotdbjdbc/messagehandler/outputs/http/normalizeddata/timeseriesdb/otlp/OtlpMetricsClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
public interface OtlpMetricsClient {
2323
@Consumes(MediaType.APPLICATION_JSON)
2424
@Produces(MediaType.APPLICATION_JSON)
25-
@Post(value = "${" + TimeSeriesDBProperties.TIME_SERIES_PROPERTY_METRICS_PATH + ":/tel/v1/metrics}")
25+
@Post("${" + TimeSeriesDBProperties.TIME_SERIES_PROPERTY_METRICS_PATH + "}")
2626
HttpResponse<String> uploadMetrics(@QueryParam("x") String queryParamX, @QueryParam("y") String queryParamY,
27-
@Body MetricsData metricsData);
27+
@Body String metricsDataString);
2828
}

0 commit comments

Comments
 (0)