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

Add detailed CRT metrics and tweak per-request logging #390

Merged
merged 2 commits into from
Jul 19, 2023

Conversation

jamesbornholt
Copy link
Member

@jamesbornholt jamesbornholt commented Jul 19, 2023

Description of change

This change is a few related things to make logging more useful:

  • Include verbose CRT request metrics at trace level. We emit what we
    think is the "interesting" stuff at higher levels, but for detailed
    investigation we might want to see the raw CRT view.
  • Add parameters to request spans. This ensures that we know which
    request is going wrong when we see log messages about requests.

Does this change impact existing behavior?

No, logging only.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).

@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 19, 2023 00:34 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 19, 2023 00:34 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 19, 2023 00:34 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 19, 2023 00:34 — with GitHub Actions Inactive
This change is a few related things to make logging more useful:
- Include verbose CRT request metrics at trace level. We emit what we
  think is the "interesting" stuff at higher levels, but for detailed
  investigation we might want to see the raw CRT view.
- Add parameters to request spans. This ensures that we know _which_
  request is going wrong when we see log messages about requests.

Signed-off-by: James Bornholt <bornholt@amazon.com>
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 19, 2023 00:36 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 19, 2023 00:36 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 19, 2023 00:36 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 19, 2023 00:36 — with GitHub Actions Inactive
Signed-off-by: James Bornholt <bornholt@amazon.com>
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 19, 2023 00:49 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 19, 2023 00:49 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 19, 2023 00:49 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 19, 2023 00:49 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt marked this pull request as ready for review July 19, 2023 02:30
Copy link
Contributor

@dannycjones dannycjones left a comment

Choose a reason for hiding this comment

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

Great QOL logging improvement!

One possible query, otherwise LGTM.

.ok_or_last_error()
.ok()?
};
assert!(!out.is_null(), "IP address should be available if call succeeded");
Copy link
Contributor

@dannycjones dannycjones Jul 19, 2023

Choose a reason for hiding this comment

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

Should this be debug assert, and return None for release builds?

Suggested change
assert!(!out.is_null(), "IP address should be available if call succeeded");
if (out.is_null()) {
debug_panic!("IP address should not be null if call succeeded");
return None;
}

Copy link
Member Author

Choose a reason for hiding this comment

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

The CRT's API is a bit inconsistent here: of the getters that can fail, only some return errors, others just silently don't do anything. For the ones that return errors (like this one does), I don't think we should try to recover if the CRT violated its contract.

@jamesbornholt jamesbornholt merged commit 9d09e1e into awslabs:main Jul 19, 2023
16 checks passed
@jamesbornholt jamesbornholt deleted the detailed-metrics branch July 19, 2023 16:04
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