cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to publish custom metrics using micrometer. Error: "Could not map JSON at .."

DineshBhat
Frequent Guest

Hello Team,

I'm trying to publish my Spring Boot application metrics using micrometer. I have completed adding required code and on running the code, I see the following error:

 

[dynatrace-metrics-publisher] ERROR io.micrometer.dynatrace.DynatraceMeterRegistry.lambda$postCustomMetricValues$6 (249) - failed to send metrics to dynatrace: {"error":{"code":400,"message":"Could not map JSON at 'series[56].dataPoints' near line 1 column 12884"}}

 

 

Can you please help here in fixing the issue?

 

Thanks,

DB

2 REPLIES 2

ryan_ott
Dynatrace Mentor
Dynatrace Mentor

Hello,

Could you please provide more information as to what code you added and the steps you took?

-Ryan

ACE Consultant, Dynatrace Services
Dynatrace Certified Professional

hi @ryan_ott ,

I think I could find the issue. I was following the steps as documented in: https://micrometer.io/docs/registry/dynatrace 

 

I had to lower the "micrometer-registry-dynatrace" version to get it working. I initially had started with the latest version of maven artifact. 

<!-- https://mvnrepository.com/artifact/io.micrometer/micrometer-registry-dynatrace -->
<dependency>
    <groupId>io.micrometer</groupId>
    <artifactId>micrometer-registry-dynatrace</artifactId>
    <version>1.1.1</version>
</dependency>