Add Server-Timing response headers#273
Open
karangoel16 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SEP: Add Server-Timing Response Headers
📋 SEP Metadata
proposal(awaiting sponsor)🎯 Abstract
This proposal adds optional
Server-Timingresponse headers across ACP REST OpenAPI 2xx responses and documents the behavior in the relevant RFCs. Implementations may use the W3CServer-Timingheader to report business/server-side processing duration with theacpmetric anddurin milliseconds, for exampleServer-Timing: acp;dur=42.3.The header is informational only. It excludes network time, does not alter response semantics, and does not replace client-observed latency measurement. Clients and platforms should continue to measure end-to-end latency independently.
💡 Motivation
ACP currently defines several protocol-level request and response headers, but it does not provide a standard way for servers to report processing duration. UCP recently added equivalent optional
Server-Timingguidance. Aligning ACP gives agents and platforms a consistent, standards-based signal for separating server processing time from client-observed latency during checkout, cart, feed, payment, authentication, and webhook flows.Without a shared convention, implementers may use proprietary timing headers, inconsistent metric names, or omit server-side timing entirely, making latency analysis harder across integrations.
📐 Specification
ACP REST responses MAY include the W3C
Server-Timingheader on successful 2xx responses.When present, ACP responses SHOULD use:
Server-Timing: acp;dur=42.3Where:
acpis the metric name.duris server processing duration in milliseconds.This PR updates:
spec/unreleased/openapi/openapi.agentic_checkout.yamlspec/unreleased/openapi/openapi.agentic_checkout_webhook.yamlspec/unreleased/openapi/openapi.cart.yamlspec/unreleased/openapi/openapi.delegate_authentication.yamlspec/unreleased/openapi/openapi.delegate_payment.yamlspec/unreleased/openapi/openapi.feed.yamlchangelog/unreleased/add-server-timing-header.md🤔 Rationale
Server-Timingis a standard HTTP response header, so ACP does not need a custom timing field or proprietary header. Keeping the header optional avoids imposing runtime instrumentation requirements on existing implementations. Using a singleacpmetric keeps the convention simple and mirrors the approach used in UCP, while avoiding protocol-specific endpoint metric proliferation in the base spec.The proposal intentionally does not make the header required, does not define SLA semantics, and does not treat this value as authoritative for user-visible latency.
🔄 Backward Compatibility
This is additive and backward compatible.
Server-Timing.🛠️ Reference Implementation
No runtime reference implementation is included. This PR updates the protocol OpenAPI and RFC documentation only.
🔒 Security Implications
The header may expose approximate server processing duration. Implementers should avoid putting sensitive internal system names, topology, query names, or vendor-specific details in the metric. This proposal recommends only the generic
acpmetric with a duration value.The header does not affect authentication, authorization, signing, payment handling, or user data processing.
✅ Pre-Submission Checklist
SEP/proposallabels)changelog/unreleased/your-change-description.md📚 Additional Context
Validation run locally:
spec/unreleased/openapi/*.yamlServer-Timinggit diff --checkpnpm validate:consistencycould not be run locally becausepnpm/corepackare not installed in this environment.🙋 Questions for Reviewers
acp, or should each API surface define a more specific metric name?Server-Timingheaders inexamples/unreleased/, or is OpenAPI/RFC documentation sufficient for an optional response header?