Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions content/workers/runtime-apis/bindings/version-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ meta:

The version metadata binding can be used to access metadata associated with a [version](/workers/configuration/versions-and-deployments/#versions) from inside the Workers runtime.

Worker version ID and version tag are available through the version metadata binding. They can be used in events sent to [Workers Analytics Engine](/analytics/analytics-engine/) or to any third-party analytics/metrics service in order to aggregate by Worker version.
Worker version ID, version tag and timestamp of when the version was created are available through the version metadata binding. They can be used in events sent to [Workers Analytics Engine](/analytics/analytics-engine/) or to any third-party analytics/metrics service in order to aggregate by Worker version.

To use the version metadata binding, update your Worker's `wrangler.toml` file:

Expand All @@ -31,10 +31,10 @@ An example of how to access the version ID and version tag from within a Worker
```js
export default {
async fetch(request, env, ctx) {
const { id: versionId, tag: versionTag } = env.CF_VERSION_METADATA;
const { id: versionId, tag: versionTag, timestamp: versionTimestamp } = env.CF_VERSION_METADATA;
env.WAE.writeDataPoint({
indexes: [versionId],
blobs: [versionTag],
blobs: [versionTag, versionTimestamp],
//...
});
//...
Expand Down