# Metric ingestion timestamp from Custom Extensions

**URL:** <https://community.dynatrace.com/t/metric-ingestion-timestamp-from-custom-extensions/54409>\
**Category:** Extensions\
**Tags:** sql, dynatrace-managed, extensions\
**Created:** [December 16, 2025, 9:57am UTC](https://community.dynatrace.com/t/metric-ingestion-timestamp-from-custom-extensions/54409 "2025-12-16T09:57:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yann\_Buccellato](https://avatars.discourse-cdn.com/v4/letter/y/97f17d/32.png) [@Yann\_Buccellato](https://community.dynatrace.com/u/Yann_Buccellato)\
**Post date:** [December 16, 2025, 9:57am UTC](https://community.dynatrace.com/t/metric-ingestion-timestamp-from-custom-extensions/54409/1 "2025-12-16T09:57:30Z")

</div>

Hello fellow community members.  
We are executing a database query via a Dynatrace extension, which creates a metric based on the query results.

I would like to understand whether it is possible to control the timestamp of the ingested datapoint from the extension’s YAML definition file—specifically, to set the timestamp to now() - 1 minute.

(to be clear with API metric v2 I know this can be achieved I just wonder if this can be achieved also from the extension)

 ![y_buccellato_0-1765878678552.png](https://global.discourse-cdn.com/dynatrace/original/2X/f/fdb859c6d2dbbeda9e887d09cec70f7cfba4e0e8.png)

The reason for this is that when the query runs at midnight (on the following day), it retrieves data from the previous two hours.  
As a result, the datapoint is currently being recorded for the new day, whereas it should be associated with the previous day.

Any idea based on your experience? 🙂

Regards

[@GerardoAud](https://community.dynatrace.com/user/74276)

---

<div class="post-metadata">

**Author:** ![david\_lopes](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/david_lopes/32/27273_2.png) [@david\_lopes](https://community.dynatrace.com/u/david_lopes)\
**Post date:** [December 20, 2025, 4:20am UTC](https://community.dynatrace.com/t/metric-ingestion-timestamp-from-custom-extensions/54409/2 "2025-12-20T04:20:20Z")

</div>

It is not possible to control the metric timestamp using the SQL datasource. You would need to move to a python extension where you have full control over the metric datapoints
