-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Summary
step.http_call does not currently expose the request duration in its output. We need an elapsed_ms field in the step output so pipelines can measure and log upstream latency.
Use Case
In a facade/proxy pattern with shadow mode, a pipeline calls two upstream services in parallel and logs divergence metrics including latency:
- name: call_primary
type: step.http_call
config:
url: "https://primary-service/api/resource"
method: GET
- name: call_shadow
type: step.http_call
config:
url: "https://shadow-service/api/resource"
method: GET
- name: log_divergence
type: step.log
config:
level: info
message: "primary_latency={{.steps.call_primary.elapsed_ms}}ms shadow_latency={{.steps.call_shadow.elapsed_ms}}ms"Currently there is no way to access the request duration from step.http_call output, forcing workarounds like -1 sentinel values in latency metrics.
Proposed Behavior
- Add
elapsed_ms(int64, milliseconds) tostep.http_calloutput alongside existing fields (status_code,body,headers) - Measured as wall-clock time from request send to response fully read
- Available in pipeline context as
steps.<step_name>.elapsed_ms
Context
This is a blocker for enabling shadow mode divergence logging in a multi-service migration. Without real latency values, divergence metrics are meaningless for capacity planning and performance comparison between services.
Reactions are currently unavailable