# How to get Metric from Transaction Page - APM

**URL:** <https://discuss.elastic.co/t/how-to-get-metric-from-transaction-page-apm/326651>\
**Category:** APM\
**Tags:** java, ui\
**Created:** [February 28, 2023, 6:29am UTC](https://discuss.elastic.co/t/how-to-get-metric-from-transaction-page-apm/326651 "2023-02-28T06:29:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zerratriani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zerratriani/32/113308_2.png) [@zerratriani](https://discuss.elastic.co/u/zerratriani)\
**Post date:** [February 28, 2023, 6:29am UTC](https://discuss.elastic.co/t/how-to-get-metric-from-transaction-page-apm/326651/1 "2023-02-28T06:29:59Z")

</div>

I want to create a dashboard from the metrics on the transaction page. How and what metrics are used? I use elasticsearch and kibana 8.5.3 and using java appilication

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/1/a161f78ee79d6d82b1a85f7a21d94c40d484c9f4.png)

---

<div class="post-metadata">

**Author:** ![lwintergerst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lwintergerst/32/18164_2.png) [@lwintergerst](https://discuss.elastic.co/u/lwintergerst)\
**Post date:** [February 28, 2023, 8:02am UTC](https://discuss.elastic.co/t/how-to-get-metric-from-transaction-page-apm/326651/2 "2023-02-28T08:02:27Z")

</div>

Hello,  
the data you are looking for is stored in `traces-apm*`  
You may have to create a new data view, unless you already have one matching that pattern (or one that's more broad would also work)

For the first three visualizations, you should filter for  
`processor.event: transaction and transaction.duration.us:*`

**Latency** : `Average` function in Lens, on `transaction.duration.us`  
**Throughput** : `Count` function in Lens, using the above Filter  
**Failed Rate** : Looks complex at first, but really simple using a Formula in Lens

```auto
count(transaction.duration.us, kql='event.outcome: "failure" ') / count(transaction.duration.us, kql='event.outcome: * ')

```

**Time spent by Span type** : you want to use an `Area Percentage` chart in Lens, filter for  
`processor.event: span and span.duration.us:*`  
and then do a Lens `Average` of ` span.duration.us`, break down by `span.type`

Now all that's left to do is to play with some of the Lens options, such as setting the data bounds (y axis) for the failed transactions chart, enable "curve lines" for all of them to make them look more similar to the APM UI if that's what you're after.

In theory you can even use Lens formulas and the `timeshift` function in it to add the comparison lines for last week or last day.

You can also filter or break things down by the field `transaction.name` to get results for specific transactions

This is 8.7 so it looks slightly different, the fields are the same in your version:

 ![Screenshot 2023-02-28 at 08.57.06](https://us1.discourse-cdn.com/elastic/original/3X/f/1/f180812793cd5b2e9673a3eecf21435253b660c7.png)

Dashboard

 ![Screenshot 2023-02-28 at 08.57.17](https://us1.discourse-cdn.com/elastic/original/3X/c/a/ca72e9aa9bacef32d338098463678fdfb72de110.png)

---

<div class="post-metadata">

**Author:** ![zerratriani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zerratriani/32/113308_2.png) [@zerratriani](https://discuss.elastic.co/u/zerratriani)\
**Post date:** [March 1, 2023, 4:02am UTC](https://discuss.elastic.co/t/how-to-get-metric-from-transaction-page-apm/326651/3 "2023-03-01T04:02:19Z")

</div>

Thank you, it's help a lot

---

<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:** [March 22, 2023, 12:02am UTC](https://discuss.elastic.co/t/how-to-get-metric-from-transaction-page-apm/326651/4 "2023-03-22T00:02:41Z")

</div>

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