Skip to content

Expand client metrics coverage - #4661

Draft
vcjana wants to merge 8 commits into
mainfrom
expand-client-metrics
Draft

Expand client metrics coverage#4661
vcjana wants to merge 8 commits into
mainfrom
expand-client-metrics

Conversation

@vcjana

@vcjana vcjana commented May 11, 2026

Copy link
Copy Markdown
Collaborator

Addresses #4248. Adds 7 new metrics to MetricsInterceptor

  • call.attempts
  • call.errors
  • serialization_duration
  • deserialization_duration
  • auth.signing_duration
  • auth.resolve_identity_duration
  • resolve_endpoint_duration.

Identity/endpoint resolution timed in the orchestrator (no interceptor hooks for these phases), stored in ConfigBag.

Testing

Ran DDB PutItem benchmark with TelemetryProvider configured. the output confirms all 7 metrics are captured end-to-end

"sdkMetrics": {
 "callDurationMeanMs": 8.02,
 "attemptDurationMeanMs": 7.95,
 "serializationDurationMeanMs": 0.018,
 "deserializationDurationMeanMs": 0.027,
 "signingDurationMeanMs": 0.072,
 "resolveIdentityDurationMeanMs": 0.007,
 "resolveEndpointDurationMeanMs": 0.011,
 "totalAttempts": 36,
 "totalErrors": 1
}

Add 7 new metrics to MetricsInterceptor:
- smithy.client.call.attempts (counter)
- smithy.client.call.errors (counter)
- smithy.client.call.serialization_duration (histogram)
- smithy.client.call.deserialization_duration (histogram)
- smithy.client.call.auth.signing_duration (histogram)
- smithy.client.call.auth.resolve_identity_duration (histogram)
- smithy.client.call.resolve_endpoint_duration (histogram)

Identity and endpoint resolution durations are measured in the
orchestrator and stored in the ConfigBag for the interceptor to record.
@vcjana
vcjana force-pushed the expand-client-metrics branch from e70cd0e to 0414085 Compare May 11, 2026 23:25
@vcjana
vcjana force-pushed the expand-client-metrics branch from 0414085 to e3e38b6 Compare May 11, 2026 23:26
@github-actions

This comment was marked as resolved.

@github-actions

This comment was marked as resolved.

@vcjana
vcjana marked this pull request as ready for review May 12, 2026 15:56
@vcjana
vcjana requested a review from a team as a code owner May 12, 2026 15:56
@github-actions

This comment was marked as resolved.

@vcjana
vcjana requested a review from a team as a code owner May 12, 2026 17:33
@github-actions

This comment was marked as resolved.

@vcjana
vcjana force-pushed the expand-client-metrics branch from 3d9ffcb to 43b0a25 Compare May 12, 2026 19:31
@github-actions

This comment was marked as resolved.

@github-actions

This comment was marked as low quality.

@aajtodd aajtodd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions/thoughts that don't necessarily have to be resolved in this PR.

  1. We should ensure we do a comprehensive review and update of our observability documentation in the dev guide as part of this. #4503
  2. We should define and integrate a new telemetry provider based on metrique: #4502
  3. Have we given any additional thought to unit of work (per request metrics rather than only aggregate we have now): #4499

Comment thread rust-runtime/aws-smithy-runtime/src/client/metrics.rs Outdated
Comment thread rust-runtime/aws-smithy-runtime/src/client/metrics.rs
@github-actions

Copy link
Copy Markdown

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@vcjana
vcjana marked this pull request as draft June 3, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants