diff --git a/content/workers/runtime-apis/bindings/version-metadata.md b/content/workers/runtime-apis/bindings/version-metadata.md index f8536589d17bebe..97bdc525ae75427 100644 --- a/content/workers/runtime-apis/bindings/version-metadata.md +++ b/content/workers/runtime-apis/bindings/version-metadata.md @@ -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: @@ -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], //... }); //...