# link custom metric event to entity

**URL:** <https://community.dynatrace.com/t/link-custom-metric-event-to-entity/53314>\
**Category:** Open Q&A\
**Tags:** dynatrace-managed, problems-classic\
**Created:** [September 11, 2025, 7:23pm UTC](https://community.dynatrace.com/t/link-custom-metric-event-to-entity/53314 "2025-09-11T19:23:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![calfanonerey](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@calfanonerey](https://community.dynatrace.com/u/calfanonerey)\
**Post date:** [September 11, 2025, 7:23pm UTC](https://community.dynatrace.com/t/link-custom-metric-event-to-entity/53314/1 "2025-09-11T19:23:51Z")

</div>

Hello everyone. We have metrics we’re sending over to dynatrace and have metric events set up for them. Without using the new davis anomaly detector is there a way to link these metric events to an entity id? I tried using dt.source.entity in the metric event but it didn’t link it to the entity here’s the impacted entity from the problem card. I want it to be tied to that application ID

thanks!

 ![calfanonerey_0-1757618579026.png](https://global.discourse-cdn.com/dynatrace/original/2X/c/c3ea1f08f1a74d22123cd7bc65386ce8a4a26d24.png)

---

<div class="post-metadata">

**Author:** ![michiel\_otten](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/michiel_otten/32/21987_2.png) [@michiel\_otten](https://community.dynatrace.com/u/michiel_otten)\
**Post date:** [September 15, 2025, 12:50pm UTC](https://community.dynatrace.com/t/link-custom-metric-event-to-entity/53314/2 "2025-09-15T12:50:47Z")

</div>

Did you use dt.source.entity or dt.source\_entity? If you use the 2nd one you should be able to link it to the right entity.

---

<div class="post-metadata">

**Author:** ![calfanonerey](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@calfanonerey](https://community.dynatrace.com/u/calfanonerey)\
**Post date:** [September 15, 2025, 1:17pm UTC](https://community.dynatrace.com/t/link-custom-metric-event-to-entity/53314/3 "2025-09-15T13:17:35Z")

</div>

no these fields are not present for this metric, it has no dynatrace specific metrics

---

<div class="post-metadata">

**Author:** ![michiel\_otten](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/michiel_otten/32/21987_2.png) [@michiel\_otten](https://community.dynatrace.com/u/michiel_otten)\
**Post date:** [September 15, 2025, 1:26pm UTC](https://community.dynatrace.com/t/link-custom-metric-event-to-entity/53314/4 "2025-09-15T13:26:51Z")

</div>

In the screenshot you added I see an Web Application ID. How is that set? If you use that ID in dt.source\_entity (not dt.source.entity) in your metric event, it should correlate to the right entity.

If you want your metric to create it’s own entity, you could investigate [this](https://docs.dynatrace.com/docs/ingest-from/extend-dynatrace/extend-topology/network-topology).  
You can use the dimensions field from an metric to inject custom entities in the platform, metric events will then automatically get the right dt.source\_entity.

---

<div class="post-metadata">

**Author:** ![calfanonerey](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@calfanonerey](https://community.dynatrace.com/u/calfanonerey)\
**Post date:** [September 15, 2025, 1:31pm UTC](https://community.dynatrace.com/t/link-custom-metric-event-to-entity/53314/5 "2025-09-15T13:31:41Z")

</div>

hmm good point idk how that’s being set. it was created using the user action custom metrics:

> **[Create USQL custom metrics for web applications in RUM Classic](https://docs.dynatrace.com/docs/observe/digital-experience/rum-classic/web-applications/additional-configuration/custom-metrics-from-user-sessions)**
>
> Every time a user session is closed, Dynatrace can extract metrics and store them as time series. Learn how to set up and use USQL custom metrics for web applications.

but when I go to add a dimension I don’t have the option to do dt.source\_entity or dt.source.entity

closest thing is dt.event.source but I’ve tried using it to no avail

 ![calfanonerey_0-1757943067963.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/2/5276e001e5ee2a809f324a58a281c9cc7d9dbf47.png)

---

<div class="post-metadata">

**Author:** ![michiel\_otten](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/michiel_otten/32/21987_2.png) [@michiel\_otten](https://community.dynatrace.com/u/michiel_otten)\
**Post date:** [September 15, 2025, 2:11pm UTC](https://community.dynatrace.com/t/link-custom-metric-event-to-entity/53314/6 "2025-09-15T14:11:20Z")

</div>

Could you check where that WEB application metric is set? It’s probably and dimension on the metric. There is a value available called:&nbsp;internalApplicationId in the user action properties:

 ![michiel_otten_0-1757945146085.png](https://global.discourse-cdn.com/dynatrace/original/3X/7/9/796c703a8ad2e318d0ac831d8f389181dafa7878.png)

If you look in the data explorer you can find it. Than you can just refer to dt.source\_entity in the metric event (it works, no worries).

 ![michiel_otten_1-1757945318816.png](https://global.discourse-cdn.com/dynatrace/original/3X/9/1/916a3856cfad5c6905272b9ba47d95fe1cdcc77c.png)

 ![michiel_otten_2-1757945339510.png](https://global.discourse-cdn.com/dynatrace/original/3X/6/1/61bcfbb130dc336c8a079797303fa173309c3681.png)

 ![michiel_otten_3-1757945466319.png](https://global.discourse-cdn.com/dynatrace/original/3X/c/2/c20f677bd38f7cac9b4102a963c47b3c69fe4a79.png)

as you can see this correlates! 🙂

---

<div class="post-metadata">

**Author:** ![calfanonerey](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@calfanonerey](https://community.dynatrace.com/u/calfanonerey)\
**Post date:** [September 15, 2025, 2:17pm UTC](https://community.dynatrace.com/t/link-custom-metric-event-to-entity/53314/7 "2025-09-15T14:17:01Z")

</div>

Thank you so much&nbsp;[@michiel\_otten](https://community.dynatrace.com/user/4669)&nbsp;!! this will definitely work. I see now looking at the metric we don’t have&nbsp;internalApplicationId as a dimension. I will work to put&nbsp;internalApplicationId as a dimension across our metrics and add the key value in the metric event. Can’t thank you enough!

---

<div class="post-metadata">

**Author:** ![michiel\_otten](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/michiel_otten/32/21987_2.png) [@michiel\_otten](https://community.dynatrace.com/u/michiel_otten)\
**Post date:** [September 15, 2025, 2:23pm UTC](https://community.dynatrace.com/t/link-custom-metric-event-to-entity/53314/8 "2025-09-15T14:23:13Z")

</div>

Your very welcome! Good luck 🙂&nbsp;&nbsp;  
P.s. the dt.source\_entity works for all metric events but has to be correlated against a&nbsp; **ENTITY ID** &nbsp;not a name
