Version metadata
BetaThe 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.toml
file:
Interface
An example of how to access the version ID and version tag from within a Worker to send events to Workers Analytics Engine: