Version metadata
Last updated Jul 3, 2026 The version metadata binding can be used to access metadata associated with a version from inside the Workers runtime.
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 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 file:
{
"version_metadata": {
"binding": "CF_VERSION_METADATA"
}
}
[version_metadata]
binding = "CF_VERSION_METADATA"
Interface
An example of how to access the version ID and version tag from within a Worker to send events to Workers Analytics Engine:
export default {
async fetch(request, env, ctx) {
const { id: versionId, tag: versionTag, timestamp: versionTimestamp } = env.CF_VERSION_METADATA;
env.WAE.writeDataPoint({
indexes: [versionId],
blobs: [versionTag, versionTimestamp],
//...
});
//...
},
};
interface Environment {
CF_VERSION_METADATA: WorkerVersionMetadata;
WAE: AnalyticsEngineDataset;
}
export default {
async fetch(request, env, ctx) {
const { id: versionId, tag: versionTag } = env.CF_VERSION_METADATA;
env.WAE.writeDataPoint({
indexes: [versionId],
blobs: [versionTag],
//...
});
//...
},
} satisfies ExportedHandler<Env>;
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/workers/runtime-apis/bindings/version-metadata/#page","headline":"Version metadata","description":"Exposes Worker version metadata (versionID and versionTag). These fields can be added to events emitted from the Worker to send to downstream observability systems.","url":"https://developers.cloudflare.com/workers/runtime-apis/bindings/version-metadata/","inLanguage":"en","image":"https://developers.cloudflare.com/workers/runtime-apis/bindings/version-metadata/og.png?v=95018e3d202eeb16","dateModified":"2026-07-03","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Spin up isolated Workers on demand to execute code. title: Dynamic Workers image: https://developers.cloudflare.com/dynamic-workers/og.png?v=51a25a49ca35a178
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/dynamic-workers/llms.txt
Use this file to discover all available pages before exploring further.
Docs