# How is the transaction.\_start set? (elastic RUM)

**URL:** <https://discuss.elastic.co/t/how-is-the-transaction-start-set-elastic-rum/338077>\
**Category:** APM\
**Tags:** rum, ui\
**Created:** [July 11, 2023, 8:34am UTC](https://discuss.elastic.co/t/how-is-the-transaction-start-set-elastic-rum/338077 "2023-07-11T08:34:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rbb](https://avatars.discourse-cdn.com/v4/letter/r/a698b9/32.png) [@Rbb](https://discuss.elastic.co/u/Rbb)\
**Post date:** [July 11, 2023, 8:34am UTC](https://discuss.elastic.co/t/how-is-the-transaction-start-set-elastic-rum/338077/1 "2023-07-11T08:34:32Z")

</div>

Hi!  
We want to create an offset to group transactions across iframes with elastic RUM. We are wondering how transaction.\_start is set and what is it relative to?

We have used the performance.timeOrigin in each initialization, but it seems that it sometimes is slightly off?

---

<div class="post-metadata">

**Author:** ![Alberto\_Delgado](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alberto_delgado/32/98488_2.png) [@Alberto\_Delgado](https://discuss.elastic.co/u/Alberto_Delgado)\
**Post date:** [July 12, 2023, 10:38am UTC](https://discuss.elastic.co/t/how-is-the-transaction-start-set-elastic-rum/338077/2 "2023-07-12T10:38:10Z")

</div>

Hi @Rbb,

Thanks for exposing your case

> We are wondering how transaction.\_start is set and what is it relative to?

By default RUM uses [performance.now](https://developer.mozilla.org/en-US/docs/Web/API/Performance/now)

There is a config available (although not documented and that **may** be removed in future versions) that allows you to set the **\_start** you want:

`elasticApm.startTransaction("my-name", "my-type", { startTime: 0 })`

Let me know if this helps you

Thanks,  
Alberto

---

<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:** [August 9, 2023, 10:38am UTC](https://discuss.elastic.co/t/how-is-the-transaction-start-set-elastic-rum/338077/3 "2023-08-09T10:38:59Z")

</div>

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