# Custom metrics; spring actuator; micrometer

**URL:** <https://community.dynatrace.com/t/custom-metrics-spring-actuator-micrometer/20512>\
**Category:** Dynatrace API\
**Tags:** dynatrace-managed, dynatrace-api, java\
**Created:** [April 30, 2019, 12:26pm UTC](https://community.dynatrace.com/t/custom-metrics-spring-actuator-micrometer/20512 "2019-04-30T12:26:41Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![christophe\_van](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@christophe\_van](https://community.dynatrace.com/u/christophe_van)\
**Post date:** [April 30, 2019, 12:26pm UTC](https://community.dynatrace.com/t/custom-metrics-spring-actuator-micrometer/20512/1 "2019-04-30T12:26:41Z")

</div>

Hello,

Our application landscape consists of multiple spring boot  
applications. Our applications have a health page, generated by spring  
actuator.

I would like to sync the health endpoints with dynatrace. In  
order to generate a dynatrace problem if the health state is “DOWN”.

The framework micrometer ([https://micrometer.io/docs/registry/dynatrace](https://micrometer.io/docs/registry/dynatrace))  
is used to send metrics to dynatrace. I was able to setup my project with  
micrometer and, according to the logs, the metrics were send to dynatrace. Where  
can I view these metrics in dynatrace? Is it possible to setup rules to create  
a dynatrace problem?

Kind regards,

Christophe.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [April 30, 2019, 12:44pm UTC](https://community.dynatrace.com/t/custom-metrics-spring-actuator-micrometer/20512/2 "2019-04-30T12:44:09Z")

</div>

It looks like micrometer is posting timeseries data to custom devices in Dynatrace. Are you able to see the custom devices in your Dynatrace tenant?  
Which ID did you use?

---

<div class="post-metadata">

**Author:** ![christophe\_van](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@christophe\_van](https://community.dynatrace.com/u/christophe_van)\
**Post date:** [April 30, 2019, 12:51pm UTC](https://community.dynatrace.com/t/custom-metrics-spring-actuator-micrometer/20512/3 "2019-04-30T12:51:37Z")

</div>

I’m not sure what you mean with custom device. I assume I don’t need to add a custom device.

I used the ID of the process group that is send the metrics. For example: PROCESS\_GROUP\_INSTANCE-6E863D93FDD6B038, the ID I used was 6E863D93FDD6B038.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [April 30, 2019, 8:41pm UTC](https://community.dynatrace.com/t/custom-metrics-spring-actuator-micrometer/20512/4 "2019-04-30T20:41:23Z")

</div>

It’s not possible to push metrics to arbitrary entities. Metrics can be pushed only for entities of “custom device” type. Look in the left menu in Technologies and see if you have any of those custom devices.

Looking at the code, it seems it will be named “java”, unless you have configured the technologyType to a value.

---

<div class="post-metadata">

**Author:** ![skrystosik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skrystosik/32/21133_2.png) [@skrystosik](https://community.dynatrace.com/u/skrystosik)\
**Post date:** [May 1, 2019, 6:42am UTC](https://community.dynatrace.com/t/custom-metrics-spring-actuator-micrometer/20512/5 "2019-05-01T06:42:51Z")

</div>

To show custom device you should pick new id, not the existing one. In such case you will see those metrics on new custom network device. You should see it in technologies dashboard.

To have problems raised based on those metrics you need to create custom thresholds as well. As I know anomaly’s detection does not work with AI on those metrics so far.

Sebastian

---

<div class="post-metadata">

**Author:** ![greg\_uctum](https://avatars.discourse-cdn.com/v4/letter/g/4af34b/32.png) [@greg\_uctum](https://community.dynatrace.com/u/greg_uctum)\
**Post date:** [December 5, 2019, 3:08pm UTC](https://community.dynatrace.com/t/custom-metrics-spring-actuator-micrometer/20512/6 "2019-12-05T15:08:44Z")

</div>

Apologies if this is unrelated, but did you ever have an issue with Tomcat being unable to start after following the instructions from that link? I’m working on a Spring application that uses Tomcat. Going one step at a time, adding in the library to my build.gradle file returns an error on running the app that it needs DynaTrace configuration values added. Putting those together via yaml and the DynaTrace config class results in “org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat” so I was wondering if you ever came across this problem and what you may have done to solve it?

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [December 6, 2019, 8:13am UTC](https://community.dynatrace.com/t/custom-metrics-spring-actuator-micrometer/20512/7 "2019-12-06T08:13:15Z")

</div>

Does this throw any other exception or error? The issue is related to micrometer, not to Dynatrace itself.

---

<div class="post-metadata">

**Author:** ![greg\_uctum](https://avatars.discourse-cdn.com/v4/letter/g/4af34b/32.png) [@greg\_uctum](https://community.dynatrace.com/u/greg_uctum)\
**Post date:** [December 6, 2019, 2:12pm UTC](https://community.dynatrace.com/t/custom-metrics-spring-actuator-micrometer/20512/8 "2019-12-06T14:12:33Z")

</div>

No it does not. I know it’s a micrometer issue as the library is coming from micrometer, but as this was one of the few searches I came across were someone successfully implemented it, I wanted to check and see if the previous user had had the same problem

---

<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:30am UTC](https://community.dynatrace.com/t/custom-metrics-spring-actuator-micrometer/20512/9 "2022-02-07T09:30:09Z")

</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

---

<div class="post-metadata">

**Author:** ![joseph-freeman](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@joseph-freeman](https://community.dynatrace.com/u/joseph-freeman)\
**Post date:** [February 10, 2023, 4:54pm UTC](https://community.dynatrace.com/t/custom-metrics-spring-actuator-micrometer/20512/10 "2023-02-10T16:54:05Z")

</div>

Quick question, is possible to to use the ingest logs api to have spring boot actuator (spring boot 3.0 uses micrometer under the hood) to send/post logs to Dynatrance via the Log Monitoring API (https://{environmentid}.live.dynatrace.com/api/v2/logs/ingest)
