# Custom Metric from dotnet agent

**URL:** <https://discuss.elastic.co/t/custom-metric-from-dotnet-agent/268656>\
**Category:** APM\
**Tags:** dotnet\
**Created:** [March 29, 2021, 12:55pm UTC](https://discuss.elastic.co/t/custom-metric-from-dotnet-agent/268656 "2021-03-29T12:55:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kbalys](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@kbalys](https://discuss.elastic.co/u/kbalys)\
**Post date:** [March 29, 2021, 12:55pm UTC](https://discuss.elastic.co/t/custom-metric-from-dotnet-agent/268656/1 "2021-03-29T12:55:13Z")

</div>

Hi,

Is it possible to send custom metric data from dotnet APM plugin? There are similar questions but for different technologies and I cannot find definite answer for dotnet.

I would like to be sending for example a numeric values which specifies number of files processed.

Elasticstack 7.11.1  
APM dotnet agent 1.7.1

---

<div class="post-metadata">

**Author:** ![GregKalapos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gregkalapos/32/37205_2.png) [@GregKalapos](https://discuss.elastic.co/u/GregKalapos)\
**Post date:** [March 29, 2021, 1:22pm UTC](https://discuss.elastic.co/t/custom-metric-from-dotnet-agent/268656/2 "2021-03-29T13:22:28Z")

</div>

Hi @kbalys,

for .NET we currently don't have a public API to send metrics, but we plan to add something in the future. [Here](https://github.com/elastic/apm-agent-dotnet/issues/322) is the GitHub issue about it.

One thing that may help is that we have a public API [to add labels (which can be a number as well)](https://www.elastic.co/guide/en/apm/agent/dotnet/current/public-api.html#api-transaction-set-label) for spans and transactions. Of course it's not a replacement or an alternative for a metrics API, so I'm just pointing this out since it may help.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 19, 2021, 9:22am UTC](https://discuss.elastic.co/t/custom-metric-from-dotnet-agent/268656/3 "2021-04-19T09:22:39Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
