# "timestamp.us" field in Elastic APM Delay

**URL:** <https://discuss.elastic.co/t/timestamp-us-field-in-elastic-apm-delay/329053>\
**Category:** APM\
**Tags:** java\
**Created:** [March 31, 2023, 1:24pm UTC](https://discuss.elastic.co/t/timestamp-us-field-in-elastic-apm-delay/329053 "2023-03-31T13:24:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Namita\_Jaokar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/namita_jaokar/32/104106_2.png) [@Namita\_Jaokar](https://discuss.elastic.co/u/Namita_Jaokar)\
**Post date:** [March 31, 2023, 1:24pm UTC](https://discuss.elastic.co/t/timestamp-us-field-in-elastic-apm-delay/329053/1 "2023-03-31T13:24:32Z")

</div>

Hi ,

I am Using Elasticsearch version 8.6.2 with Elastic APM java Agent.

While parallelly running 3 to 4 scenarios of my application, it seems the stop-time time of my application does not match the [timestamp.us](http://timestamp.us) of the transaction traces. Due to this, Its affecting the application's business logic.

Example: the stop-time of my scenario captured was 12:20 PM and the [timestamp.us](http://timestamp.us) is 12:21 PM when converted into timestamp

The stopTime which is System.currentTimeMillis() in my application logic is lesser than the [timestamp.us](http://timestamp.us) field in the transaction traces.

This Stop-time is captured after the execution of the entire scenario.

So, My Assumption is that [timestamp.us](http://timestamp.us) should be **lesser than or equal to** the stop-time of my application's scenario.

Can someone please help me understand what time does [timestamp.us](http://timestamp.us) exactly denote? Is it the transaction response time or the time the transaction was logged in elasticsearch?

In the current issue that I am facing in my application, I assume that there might be a lag in the transaction traces been sent to the apm-server.

Your advise/ Suggestion would be of great help.

Thanks & Regards,  
Namita Jaokar

---

<div class="post-metadata">

**Author:** ![Jonas\_Kunz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonas_kunz/32/110740_2.png) [@Jonas\_Kunz](https://discuss.elastic.co/u/Jonas_Kunz)\
**Post date:** [March 31, 2023, 2:22pm UTC](https://discuss.elastic.co/t/timestamp-us-field-in-elastic-apm-delay/329053/2 "2023-03-31T14:22:17Z")

</div>

`timestamp.us` on spans and transactions is recorded by the agents, therefore the time is based on the clock of your monitored system. The timestamp is in _microseconds_ since the UNIX epoche, while `System.currentTimeMillis()` is in milliseconds.

---

<div class="post-metadata">

**Author:** ![Namita\_Jaokar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/namita_jaokar/32/104106_2.png) [@Namita\_Jaokar](https://discuss.elastic.co/u/Namita_Jaokar)\
**Post date:** [March 31, 2023, 5:43pm UTC](https://discuss.elastic.co/t/timestamp-us-field-in-elastic-apm-delay/329053/3 "2023-03-31T17:43:09Z")

</div>

Hi @Jonas_Kunz ,

By the agent you mean the Elastic APM Agent jar , correct?  
I have the logic added wherein the microseconds to milliseconds conversion is handled.

What I understand here is that [timestamp.us](http://timestamp.us) gives the time of the system-(wherein the application under observability is deployed ) that is configured with the agent.  
What is the difference between @timestamp and [timestamp.us](http://timestamp.us) apart from the timestamp format ? Is there any other major differences between the two?

Thanks & Regards,  
Namita Jaokar

---

<div class="post-metadata">

**Author:** ![Jonas\_Kunz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonas_kunz/32/110740_2.png) [@Jonas\_Kunz](https://discuss.elastic.co/u/Jonas_Kunz)\
**Post date:** [April 3, 2023, 8:10am UTC](https://discuss.elastic.co/t/timestamp-us-field-in-elastic-apm-delay/329053/4 "2023-04-03T08:10:54Z")

</div>

> By the agent you mean the Elastic APM Agent jar , correct?

Correct.

> What is the difference between @timestamp and [timestamp.us](http://timestamp.us/) apart from the timestamp format ? Is there any other major differences between the two?

There should be no difference apart from the format. I think `timestamp.us` was introduced because `@timestamp` only has millisecond precision, which in many cases is not enough.

---

<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 24, 2023, 4:11am UTC](https://discuss.elastic.co/t/timestamp-us-field-in-elastic-apm-delay/329053/5 "2023-04-24T04:11:40Z")

</div>

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