[Workers] Clarify CPU profiling support for native Preview deployments · Issue #34290 · cloudflare/cloudflare-docs · GitHub
Skip to content

[Workers] Clarify CPU profiling support for native Preview deployments #34290

Open

Description

@penpeerevent-source

Existing documentation URL(s)

What changes are you suggesting?

Please document whether deployed native Worker Previews can use CPU profiling, and how to target one specific Preview deployment if supported.

The profiling documentation uses:

POST /accounts/{account_id}/workers/workers/{worker_id}/versions/{version_id}/profile

Native Previews expose their deployments through:

GET /accounts/{account_id}/workers/workers/{worker_id}/previews/{preview_id}/deployments/{deployment_id}

The native Preview deployment response has a deployment id and number, but no documented version_id mapping. This leaves it unclear which identifier the profiling endpoint should accept for an existing native Preview deployment.

Please clarify:

  1. Is CPU profiling supported for native Preview deployments?
  2. If supported, what official API or CLI path and identifiers target a specific current Preview deployment? Is there a deployment-to-version mapping?
  3. Does the dashboard support selecting that exact native Preview deployment and downloading raw pprof data? If so, please document the selection and export steps.

If this environment is unsupported, please state that limitation on the profiling and Preview debugging pages.

This matters when investigating the exact deployed Preview code without creating another deployment, changing production, or using an unverified latest target.

Additional information

Read-only preflight observed on 2026-10-14:

  • The native Preview deployment GET returned HTTP 200; the deployment was current, and its commit annotation matched the intended code.
  • GET /accounts/{account_id}/workers/workers/{worker_id}/versions/{native_preview_deployment_id} returned Cloudflare error 10071: “The requested Worker version could not be found, please check the ID being passed and try again.”
  • GET /accounts/{account_id}/workers/workers/{worker_id}/versions returned HTTP 200 with an empty result array.
  • No profiling POST was issued because a valid target version could not be established.

The 10071 error above came from the version lookup GET, not from the profiling endpoint. Account profiling entitlement and runtime profiling availability have not been inferred from that error.

Identifiers are placeholders; account details, credentials, private repository names, Preview URLs, commit SHAs, and deployment IDs are omitted.

Activity

  1. penpeerevent-source commented on Oct 14, 2026

    @penpeerevent-source
    Author

    Additional read-only dashboard/API observations on 2026-10-14:

    • In the native Preview’s own Observability tab (breadcrumb: Worker > Preview), the Events dropdown offers only Events, Invocations, Traces, and Visualizations. There is no Flamegraph entry or profiling version selector in this observed menu.
    • The same page says “Workers Observability is Disabled” and offers Enable Observability.
    • A fresh API read at 10:05 UTC returned HTTP 200: the native Preview has observability.enabled=true and logs.enabled=true; its undeployed parent Worker has observability.enabled=false and logs.enabled=false. The intended native Preview deployment and commit annotation remain unchanged.

    We did not click Enable Observability, change settings, redeploy, or issue a profiling POST. These observations do not establish why Flamegraph is missing or whether all native Previews are unsupported.

    Could you clarify whether this UI/API discrepancy is expected, and provide a supported exact-native-Preview-deployment CPU profiling and raw pprof export path, including the accepted version identifier? If a feature flag or setting is required, please identify it explicitly. Account, Worker, Preview, repository, and deployment identifiers are intentionally omitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions