Skip to content

Add worker metrics to the PHP and Rust SDKs, matching Python #233

Open

Description

@rmcdaniel

Problem

At intake, only the Python SDK emitted worker and client metrics. Rust delivered its portion in 4.7.0, and Python 2.10.0 now publishes the bounded-route/recorder correction. PHP implementation and qualification remain open. The original source evidence and current delivery records are separated below.

The original report was source-verified. Current implementation and runtime evidence follow.

Acceptance criteria

  • The PHP SDK and the Rust SDK accept a pluggable metrics recorder on the client and worker, with a no-op default.
  • They emit the same metric names, types, units and tag keys as Python, so one dashboard query works across SDKs.
  • One shared list of metric names, types, units and tags is published, and each SDK's tests check their output against it.
  • Each SDK guide shows exporting the metrics to Prometheus or OpenTelemetry.

Current contract and implementation state

  • Shared contract published: #245, merge 73e8fc323e4f46322945a007e54a546395904f79. Its published JSON matches the tested bytes, SHA-256 c456f4f434c601fa26f0caba07ef0fd29f548ca8f5fc29ba2f6430f01e32c0f0; all seven candidate and six independent main checks pass. Its machine-readable list describes the six inspected Python recorder names, instruments, units and exact tag keys. Registry publication alone establishes no SDK adoption.
  • Python is delivered as 2.10.0, immutable annotated tag f857cb343371e13bdbdf39cfa7569040114fc891 targeting qualified source 4f853f396dba5a530ef0815509b16bfddaa9ebc3. Protected OIDC publication 39978389335 succeeded. Independent PyPI download confirms the actual wheel SHA-256 62a78da1c5bdc2af607c11eede5c56a3d25c2159e5f2266c72176f5aa8dda115 and byte-identical metrics module against that tag. Its source test fixture retains canonical shared JSON SHA-256 c456f4f434c601fa26f0caba07ef0fd29f548ca8f5fc29ba2f6430f01e32c0f0. The SDK owner's normal registry-installed acceptance records all 37 source files, all 50 hashed RECORD entries and 334 passing controls, including the actual Prometheus adapter and shared metrics-contract tests. This audit read those controls' receipt rather than rerunning them. Documentation PR #212 merged as e530e33ec1303530779f91a0d249666c9f9aca16; its Pages run 39982873189 succeeded. Earlier local 12b/4f artifacts remain distinct build cohorts. No automatic SDK, Server, Sample App or Cloud adoption follows this publication.
  • All three SDK owners acknowledged the published registry commit and hash. PHP implementation is tracked in SDK #214 and draft PR #215. The independently read head b1ab72f4b54679367a7cb54fa22a29e500ac7a13 now contains client-request, worker-poll and parent task-dispatch instrumentation, recorder inheritance/override, optional transport status metadata and exporter-error isolation. Its six metrics tests cover constructed request/poll observations, one logical request across the internal transient retry, bounded labels and recorder separation. The owner reports 89 source tests / 1,036 assertions passing, including six metrics tests / 363 assertions. These replace the earlier deliberately red groundwork stage at 6c804cbb. Independent readback of the b1 vendored shared JSON confirms the complete hash c456f4f434c601fa26f0caba07ef0fd29f548ca8f5fc29ba2f6430f01e32c0f0. The public PR source checkpoint now names b1 and explicitly separates the existing no-op Worker controls from pending emitted task/fork tests. Emitted worker-task outcomes in ordinary/cooperative execution, complete route coverage, optional exporter acceptance, normal installed-package qualification and guides remain pending with the SDK owner. This is partial source implementation, with no released-package or cross-SDK parity claim.
  • Rust implementation is delivered as 4.7.0, source 5e2af20fde934e05bf18f64111dce8e590ea6c90, through SDK PR #131. Independent registry/archive readback confirms SHA-256 dc6c0353e940a068f4a71eef8dc516d920c88be34f9c68e205f05ec10c34e65b, its embedded source identity, and byte-identical shared JSON hash c456f4f434c601fa26f0caba07ef0fd29f548ca8f5fc29ba2f6430f01e32c0f0. The SDK owner records normal Rust 1.86 installation, four public HTTP controls and fresh published Server 2.11.0 all-six-metric/Prometheus acceptance. This audit read those runtime receipts without rerunning them. Finite Rust enum-category outcomes retain the documented language-specific distinction.
  • Rust exporter guides are delivered in all eight locales through Website PR #389. The guide receipt records actual Pages deployment, sixteen route/browser checks and matching released example bytes. Independent readback confirms that Pages run succeeded and the live English guide contains the feature and six metric names. No other SDK or Server/Cloud adoption follows from the Rust package/guide delivery.
  • Registry guide reconciled: #257 records the delivered Rust evidence and distinguishes pinned Python reference behavior from later source/local-candidate corrections. All seven candidate and six independent main checks pass, with exact published README/JSON verification. Delivery and current SDK evidence.
  • PR #262 merged as 869a7d2dfa6dc17083ddfe9c0e78352cc1cae9d3 after all seven checks passed for exact head 96a1d28961196ecb2199be4a154eef6de2da3ac5, with direct Sonar OK and zero open/confirmed PR findings. It links Python's published-package receipt and live exporter reference. The tested/published whole tree matches, and the published README has blob 61e1bc3a93f63ce156daa73247a0359eb0707920, SHA-256 c542a0ec841dbb8b862e995c2e33d080acd47c7800855626059e804156079e42. All six independent main checks pass, with direct Sonar analysis bound to that revision and gate OK. Delivery and published-byte verification. Canonical JSON and its original reference remain unchanged.
  • Next: continue PHP implementation, emitted worker-task/fork controls, exporter guidance and normal installed-package acceptance through its owner before closing this issue. Python 2.10.0 and the Rust 4.7.0 delivery baseline are published; later package versions and downstream adoption need their own evidence. Keep IDs, payloads and credentials out of core labels; preserve explicit names, types, units and tag keys.

Activity

  1. added
    kind:cross-repositoryWork spans more than one public repository
    priority:P3Lower-priority product improvement
    status:readyReady for implementation
    repo:sdk-phpOwned by the PHP SDK repository
    repo:sdk-rustOwned by the Rust SDK repository
    on Oct 21, 2026
  2. rmcdaniel commented on Oct 22, 2026

    @rmcdaniel
    MemberAuthor

    Scope note: dashboards and alert rules break when a metric or tag key is renamed, so the shared list should say how those names may change. The compatibility page's public surface families don't say whether SDK metric names and tags are stable. The Server's metric series are covered only implicitly, as part of a system route's response.

    • Give the published names, types, units and tag keys a stability level on that page.
    • Treat renaming or removing a stable metric or tag key as a major change. Announce any additions or changed tag values in the changelog.
  3. rmcdaniel commented on Oct 23, 2026

    @rmcdaniel
    MemberAuthor

    The shared list is in draft #245. This slice publishes only the common recorder contract: six actual Python names, counter/histogram types, count/second units and exact tag keys. PHP/Rust implementation and all three SDKs' adoption tests and exporter guides remain required. The registry is not evidence that those SDKs emit it.

    Product review found an implementation gap relevant to bounded labels: the inspected Python client.py at 2da02a7ac8a68a7cd4267e86ef10e0198a309592 normalizes ordinary activity-task IDs but retains IDs in actual /worker/update-validation-tasks/{id}/approve and /worker/sessions/{id}/heartbeat paths. I exercised only that exact normalization function with synthetic values, not an installed SDK or live Server. The draft records this honestly and requires placeholder/unknown route values rather than identifiers, query strings, payloads or credentials. This needs a Python owner correction and emitted-value controls before claiming bounded labels.

    The shared JSON is intended for each SDK's tests to consume at a pinned commit. Stable names/types/units/tag keys need migration-aware major changes; additions and changed tag values need changelog entries. Coordination is being sent to the three existing SDK owners. This audit stays open through actual cross-SDK product delivery.

  4. rmcdaniel commented on Oct 23, 2026

    @rmcdaniel
    MemberAuthor

    Delivered #245 at 73e8fc323e4f46322945a007e54a546395904f79, whole tree be3661389c1ceb3ba7759bcef10ced07f1bad937, identical to qualified 6e96ec51. All seven candidate and six independent main checks pass, including main contracts and main Sonar. The exact main analysis names that merge. Direct PR review reports zero OPEN/CONFIRMED, and the valid assertion-order finding is CLOSED/FIXED without tuning. This is not a claim that the older project-wide Sonar backlog is empty.

    The published JSON is independently byte-identical to the tested contract: SHA-256 c456f4f434c601fa26f0caba07ef0fd29f548ca8f5fc29ba2f6430f01e32c0f0. All three SDK maintainers received and acknowledged the immutable commit/hash. Exact verified offline copies are supported. The merged remote head is absent.

    This delivers only the shared names/types/units/tag keys and compatibility/adoption guidance. Python #205 / #206 owns the actual bounded routes and recorder observations; its publication and installed acceptance remain separate. PHP/Rust instrumentation and installed exporter guidance remain incomplete. Registry publication does not establish cross-SDK parity, so this issue stays open.

  5. added
    status:in-progressApproved work is actively being implemented or validated
    and removed
    status:readyReady for implementation
    on Oct 23, 2026
  6. rmcdaniel commented on Oct 23, 2026

    @rmcdaniel
    MemberAuthor

    Rust implementation is now in draft sdk-rust131, prospective compatible minor4.7.0, exact initial source 149efb74b2e96e26771929ace8f92294ebee7051. It vendors the byte-identical shared JSON at73e8fc3 / SHA256c456f4f434c601fa26f0caba07ef0fd29f548ca8f5fc29ba2f6430f01e32c0f0.

    Eight actual HTTP/worker controls pass for names/instruments/units/tag keys and paired+1/nonnegative durations, original-plane routing, ID/query/unknown-route privacy, logical transport retry, page-request counting, empty/error/backpressure polls, workflow/activity/query success/failure, recorder inheritance/override and no-op/panic isolation. The optional Prometheus adapter uses the official0.14 client with an application-owned dedicated registry. The expanded query control initially omitted its required workflow registration; the fixture was corrected. A full run also exposed stack pressure in an existing adjacent-condition replay test after request wrapping; boxing the request I/O future fixes that exact unchanged regression without increasing stack limits or altering fixtures. The complete rerun is required and running.

    Exact hosted CI/corpus, CodeQL/Sonar, published Server emitted-value qualification, protected publication, normal installed adapter acceptance and published exporter guides remain before Rust delivery. This is source progress only; this shared issue stays open for every SDK's actual delivery. No Server implementation or producer fixture coercion is included.

  7. rmcdaniel commented on Oct 23, 2026

    @rmcdaniel
    MemberAuthor

    Rust implementation and normal installed acceptance are delivered as 4.7.0, exact source5e2af20fde934e05bf18f64111dce8e590ea6c90, protected OIDC39947861450 passed. durable-workflow/sdk-rust#131 (comment) records the API/archive/lock checksum, Rust1.86/no source override, preserved security floors, all4 public HTTP controls and fresh published Server2.11.0 all-six-metric/Prometheus acceptance. The released README/runnable adapter recipe is included. All-locale Website exporter guide follow-through remains separate; PHP/Python and the shared issue stay open with their owners. No Server/Cloud or other SDK adoption is claimed.

  8. rmcdaniel commented on Oct 23, 2026

    @rmcdaniel
    MemberAuthor

    The Rust portion is fully delivered, including published all-locale exporter guidance.

    • SDK4.7.0 source/tag 5e2af20fde934e05bf18f64111dce8e590ea6c90 passed protected OIDC publication and normal installed Rust1.86 HTTP/worker/Prometheus acceptance: exact package identities, checksum and installed receipt.
    • Website388 final delivery records all8 Rust/monitoring guides, merged389 at 04b9b17a9ec2a7314149030762d9594be7600b18, exact all-locale CI39949958605, artifact39950742509 and actual Pages39951424533. The Website owner verified16 live routes, language/canonical/alternate links and mobile light/dark rendering.
    • My independent16-route readback passes HTTP/content, every canonical and all9 alternate-language targets. All8 rendered Rust examples decode to the exact released/installed example SHA256 77692e778f3edfed368ebd771c8402755d71697a481fb79c827b13831ca882d6. The live guide states minimum4.7.0, optional metrics-prometheus, exact names/tag keys, no-op/inheritance/override, request/page/retry observations and application-owned scrape/export lifecycle.

    The shared issue stays open for the other SDKs and their remaining acceptance with their owners. The selected Server/SDK tuple and other SDK/Cloud adoption are unchanged.

  9. rmcdaniel commented on Oct 23, 2026

    @rmcdaniel
    MemberAuthor

    Additional independent Python source-adoption check at the fixed #210 candidate 12b5f3721e99afcfa37558dbcb78676d7bc49575: the vendored JSON is byte-identical to the shared registry, SHA-256 c456f4f434c601fa26f0caba07ef0fd29f548ca8f5fc29ba2f6430f01e32c0f0. Its provenance pins shared merge 73e8fc3. The SDK tests load that list and compare recorder operations, names, types/units, tag keys, paired +1/nonnegative durations, recorder inheritance/override and the Prometheus adapter.

    The client/poll/task controls exercise actual recorder hooks with constructed HTTP, poll and task behavior. Source inspection of those controls is not live Server worker qualification. The SDK owner's locally packaged installed receipt remains separate. A fresh PyPI metadata read still reports 2.9.0 and no 2.10.0 release, so normal registry publication/installed acceptance remains pending.

    #257 is merged with seven candidate checks and direct Sonar OK/zero unresolved findings; published README/JSON bytes have been independently verified. Its independent main checks are still pending. The guide now preserves the delivered Rust package/guides and other SDKs' remaining delivery; JSON revision and contracts are unchanged. #233 remains open.

  10. rmcdaniel commented on Oct 23, 2026

    @rmcdaniel
    MemberAuthor

    Delivered #257, merge 0f4fdb071d0ddff0fb11232760d422005657c372. All seven candidate and six independent main checks pass; direct Sonar is OK with zero unresolved candidate findings and main analysis at this exact merge. Candidate a42d6552a5e0ae3d1f1fc4ca99245e6091aab284 and merge share tree 7999c1f3be6481e8f3a9e31318ac1b8ddb7c91c4. Published README blob 262c78eca74e15c82e3e48ec4fa058d7fc4901ed, SHA-256 a9036923a2275fb9960c9931ba3812c7437db8426229f83160f665a3e34f4819, independently matches tested bytes. Completed remote/local heads are retired. JSON revision and SHA-256 c456f4f434c601fa26f0caba07ef0fd29f548ca8f5fc29ba2f6430f01e32c0f0 remain unchanged.

    The Python owner identified a newer complete untagged candidate: SDK #213, head 4f853f396dba5a530ef0815509b16bfddaa9ebc3, merge 38b5a639262bebcf3fd0e67c6ec42ab16bc3a966. Independent readback confirms equal tree 26b7da4ee940bc1706889ca6165eac40b89e67ab, the same shared JSON fixture/hash, passing normal candidate checks plus build-only success, explicit publish skip, and fifteen passing main checks. The owner's artifact receipt records fresh wheel/sdist smoke, 37 installed source/RECORD matches and 272 controls including the actual Prometheus adapter. Those are locally built/installed results, not registry publication or live Server worker acceptance. Earlier #210/12b remains historical; it is superseded as the current complete candidate. PyPI still reports 2.9.0, with no 2.10.0 publication.

    The PHP owner again confirms metrics implementation/tests/exporter delivery are not yet present. Rust's recorded package and guide delivery remain complete in their scope. #233 stays open for actual cross-SDK product delivery; this README reconciliation does not close it.

  11. rmcdaniel commented on Oct 23, 2026

    @rmcdaniel
    MemberAuthor

    Bounded route-label source check: Python's current untagged candidate 4f853f3 and published Rust 4.7 source 5e2af20 contain the same 92 ordered operation templates, including the placeholder names. This is implementation-source comparison, not an added registry vocabulary.

    I executed the actual pure Python normalizer over each template with two synthetic variable-ID values, query secrets and fragments, plus three unknown-path cases (555 constructed calls). Known operations retain only their reviewed template and unknown operations return the single unknown value; synthetic IDs/query values do not become output labels. Rust's matching function was source-reviewed, not executed by this check. No SDK/Server, external exporter or runtime worker was started and no dependencies/build artifacts were created.

    This corroborates bounded-label behavior at the named source boundary. Python normal registry publication, PHP hooks/actual observations and each adapter's installed acceptance remain separate. JSON revision1 and its c456 hash are unchanged; no new taxonomy, names, types, units or tag keys are introduced.

  12. rmcdaniel commented on Oct 23, 2026

    @rmcdaniel
    MemberAuthor

    Python's normal registry consumer is now durable-workflow==2.10.0, immutable annotated tag f857cb343371e13bdbdf39cfa7569040114fc891 → qualified source 4f853f396dba5a530ef0815509b16bfddaa9ebc3. OIDC and independent installed acceptance records all 37 source files, all 50 hashed RECORD entries and 334 passing controls, including actual Prometheus and the shared metrics-contract checks.

    The included contract fixture retains exact SHA-256 c456f4f434c601fa26f0caba07ef0fd29f548ca8f5fc29ba2f6430f01e32c0f0, with its existing provenance unchanged. The published wheel SHA-256 is 62a78da1c5bdc2af607c11eede5c56a3d25c2159e5f2266c72176f5aa8dda115; source-only prototypes are separate. Existing route taxonomy and compatibility floors remain in force; this is Python registry acceptance, not automatic adoption by another consumer.

  13. rmcdaniel commented on Oct 23, 2026

    @rmcdaniel
    MemberAuthor

    PR #262 is delivered as merge 869a7d2dfa6dc17083ddfe9c0e78352cc1cae9d3. The registry README now links Python's actual published-package acceptance and live exporter reference, while PHP implementation and qualification remain open.

    All seven checks passed for exact candidate 96a1d28961196ecb2199be4a154eef6de2da3ac5, with direct Sonar OK and zero open/confirmed PR findings. All six independent main checks pass: shared controls, Sonar analysis and three CodeQL languages attached to that exact revision. Direct Sonar analysis ca0f3cd5-3c5f-4912-9ced-282511378679 identifies 869a7d2 and reports quality gate OK.

    The tested/published whole tree is b969ec8fde2b23060ed4c17c82139e0ee8279f61. Published sdk-metrics/README.md has blob 61e1bc3a93f63ce156daa73247a0359eb0707920, SHA-256 c542a0ec841dbb8b862e995c2e33d080acd47c7800855626059e804156079e42. Canonical JSON, its original reference and SHA-256 c456f4f434c601fa26f0caba07ef0fd29f548ca8f5fc29ba2f6430f01e32c0f0 remain unchanged. Completed branch and source checkout are retired.

    The actual Python 2.10.0 wheel/tag/module verification and the SDK owner's attributed 334-control registry-installed receipt remain in the current issue description. This documentation change starts no runtime and adopts no SDK in another consumer. #233 stays open for PHP's actual instrumentation, emitted task/fork controls, complete routes, exporter guidance and installed-package acceptance. The PHP owner confirms its separately prepared 3.5.0 failure-reporting release excludes the metrics branch.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:cross-repositoryWork spans more than one public repositorypriority:P3Lower-priority product improvementrepo:sdk-phpOwned by the PHP SDK repositoryrepo:sdk-rustOwned by the Rust SDK repositorystatus:in-progressApproved work is actively being implemented or validated

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions