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

**URL:** <https://community.dynatrace.com/t/unable-to-publish-custom-metrics-using-micrometer-error-could-not-map-json-at/32302>\
**Category:** Open Q&A\
**Tags:** dynatrace-managed, java\
**Created:** [August 4, 2021, 6:26am UTC](https://community.dynatrace.com/t/unable-to-publish-custom-metrics-using-micrometer-error-could-not-map-json-at/32302 "2021-08-04T06:26:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DineshBhat](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@DineshBhat](https://community.dynatrace.com/u/DineshBhat)\
**Post date:** [August 4, 2021, 6:26am UTC](https://community.dynatrace.com/t/unable-to-publish-custom-metrics-using-micrometer-error-could-not-map-json-at/32302/1 "2021-08-04T06:26:57Z")

</div>

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:

```java
[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

---

<div class="post-metadata">

**Author:** ![ryan\_ott](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/ryan_ott/32/15818_2.png) [@ryan\_ott](https://community.dynatrace.com/u/ryan_ott)\
**Post date:** [August 4, 2021, 1:21pm UTC](https://community.dynatrace.com/t/unable-to-publish-custom-metrics-using-micrometer-error-could-not-map-json-at/32302/2 "2021-08-04T13:21:56Z")

</div>

Hello,

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

-Ryan

---

<div class="post-metadata">

**Author:** ![DineshBhat](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@DineshBhat](https://community.dynatrace.com/u/DineshBhat)\
**Post date:** [August 10, 2021, 5:12am UTC](https://community.dynatrace.com/t/unable-to-publish-custom-metrics-using-micrometer-error-could-not-map-json-at/32302/3 "2021-08-10T05:12:07Z")

</div>

hi&nbsp;[@ryan\_ott](https://community.dynatrace.com/user/7888)&nbsp;,

I think I could find the issue. I was following the steps as documented in:&nbsp;[https://micrometer.io/docs/registry/dynatrace](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.

```java
<!-- 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>

```

---

<div class="post-metadata">

**Author:** ![sonja](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/sonja/32/10349_2.png) [@sonja](https://community.dynatrace.com/u/sonja)\
**Post date:** [February 7, 2022, 9:27am UTC](https://community.dynatrace.com/t/unable-to-publish-custom-metrics-using-micrometer-error-could-not-map-json-at/32302/4 "2022-02-07T09:27:12Z")

</div>

Hello! I just wanted to let you know - and for future references - that we have published a new version of the micrometer registry for Dynatrace:&nbsp;[https://micrometer.io/docs/registry/dynatrace](https://micrometer.io/docs/registry/dynatrace), with simplified deployment and that automatically connecting your Micrometer metrics to the topology.

Documentation:&nbsp;[Send Micrometer metrics to Dynatrace — Dynatrace Docs](https://www.dynatrace.com/support/help/how-to-use-dynatrace/metrics/metric-ingestion/ingestion-methods/micrometer)

Sonja
