Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: log requestId, extendedRequestId, cfId in $metadata #1819

Merged
merged 2 commits into from Dec 23, 2020

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Dec 21, 2020

Issue #, if available:
Refs: #1521
Refs: #1522
Depends on: smithy-lang/smithy-typescript#252

Description of changes:
fix: log requestId, extendedRequestId, cfId in $metadata

Test code
(async () => {
  const client = new DynamoDB({ region: "us-west-2", logger: console });
  await client.listTables({ Limit: 1 });
})();
Test output
{
  clientName: 'DynamoDBClient',
  commandName: 'ListTablesCommand',
  input: { Limit: 1 },
  output: {
    LastEvaluatedTableName: 'CUSTOMER_LIST',
    TableNames: [ 'CUSTOMER_LIST' ]
  },
  metadata: {
    httpStatusCode: 200,
    requestId: 'B8H6HG1T8PDAL2N4BBHKEBERE3VV4KQNSO5AEMVJF66Q9ASUAAJG',
    extendedRequestId: undefined,
    cfId: undefined,
    attempts: 1,
    totalRetryDelay: 0
  }
}

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@trivikr trivikr marked this pull request as draft December 21, 2020 20:26
@codecov-io
Copy link

codecov-io commented Dec 21, 2020

Codecov Report

Merging #1819 (1d3efa8) into master (dd04fa3) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1819      +/-   ##
==========================================
- Coverage   79.30%   79.29%   -0.02%     
==========================================
  Files         368      367       -1     
  Lines       15132    15119      -13     
  Branches     3222     3225       +3     
==========================================
- Hits        12001    11988      -13     
  Misses       3131     3131              
Impacted Files Coverage Δ
packages/middleware-logger/src/loggerMiddleware.ts 100.00% <ø> (ø)
protocol_tests/aws-ec2/protocols/Aws_ec2.ts 66.97% <100.00%> (+0.03%) ⬆️
protocol_tests/aws-json/protocols/Aws_json1_1.ts 72.14% <100.00%> (+0.03%) ⬆️
protocol_tests/aws-query/protocols/Aws_query.ts 66.37% <100.00%> (+0.02%) ⬆️
...ocol_tests/aws-restjson/protocols/Aws_restJson1.ts 63.68% <100.00%> (+0.01%) ⬆️
...rotocol_tests/aws-restxml/protocols/Aws_restXml.ts 64.11% <100.00%> (+0.01%) ⬆️
packages/middleware-retry/src/constants.ts 100.00% <0.00%> (ø)
packages/middleware-retry/src/defaultStrategy.ts 100.00% <0.00%> (ø)
...middleware-retry/src/omitRetryHeadersMiddleware.ts

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64d2210...8265db4. Read the comment docs.

@trivikr trivikr marked this pull request as ready for review December 22, 2020 01:11
Copy link
Contributor

@alexforsyth alexforsyth left a comment

Choose a reason for hiding this comment

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

LGTM!

@trivikr trivikr merged commit f2a47e8 into aws:master Dec 23, 2020
@trivikr trivikr deleted the update-metadata branch December 23, 2020 17:57
@github-actions
Copy link

github-actions bot commented Jan 8, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants