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

Adding status code handler to clients #36716

Closed

Conversation

Paramadon
Copy link

PR Description

Background

As part of our ongoing efforts to improve the monitoring and observability of our API calls, we have a COE action item to ensure that all API call status codes are captured and tracked. This is crucial to help identify and resolve any issues proactively. Currently, the agenthealth middleware, which has already been developed, is not integrated into all of our clients.

Agent health extension pr: aws/amazon-cloudwatch-agent#1423
Agent changes pr: aws/amazon-cloudwatch-agent#1442

Overview of Changes

This pull request addresses the integration of the agenthealth middleware into all relevant clients in the contrib repository. Specifically, this change is focused on the following components:

  • ResourceDetectionProcessor
  • ContainerInsightReceiver
  • Exporters

These components are central to our monitoring pipeline, and by adding the agenthealth middleware to them, we ensure that all API calls made within these parts of the codebase are monitored for status codes. This will help us track the health and performance of the services that these components interact with, providing valuable insights into potential issues.

Details of Changes

  • Middleware Integration: The agenthealth middleware has been added to the API clients used within the ResourceDetectionProcessor, ContainerInsightReceiver, and the various Exporters. This middleware is responsible for capturing and logging the status codes of all API requests, allowing for better tracking and troubleshooting of potential issues.

  • Improved Observability: With the middleware in place, we now have enhanced visibility into the performance and reliability of the APIs we interact with. This change will help surface any unexpected issues, such as 5xx server errors or 4xx client errors, allowing for faster identification and resolution of problems.

  • Consistency: The integration of this middleware across multiple components ensures that monitoring is consistent throughout the system, and all API calls are tracked uniformly, eliminating gaps in observability.

Impact

  • Enhanced Monitoring: By adding the agenthealth middleware, this change improves our ability to detect and monitor API errors across the system, ensuring better visibility into issues with external services.

  • Proactive Issue Detection: The ability to monitor status codes enables us to identify and address issues before they impact users, improving the reliability and stability of the system.

  • Consistency Across Components: With the integration of this middleware across multiple clients, we ensure that all parts of the system are monitored in a standardized way, leading to a more cohesive monitoring strategy.

sky333999 and others added 30 commits April 17, 2023 13:43
… name (#3)

* Add option to override cluster name
#4)

[receiver/awscontainerinsightreceiver] Parameterize EKS CI leader lock name
Skip flaky test

(cherry picked from commit 14983a6)
Getting 404s when trying to run apt update w/ debian 9

---------

Signed-off-by: Alex Boten <[email protected]>
(cherry picked from commit 80069fb)
…ics for capacity_pods, allocatable_pods and conditions (#17)
…heus_poc

Initial commit of prometheus scraper for pulling control plane metrics from k8sapiserver prometheus endpoint
Lint fixes for #14 (#18)
Copy link

CLA Missing ID CLA Not Signed

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

Why is this change mixed with go version changes and unrelated dependency upgrades?

Copy link
Member

@songy23 songy23 left a comment

Choose a reason for hiding this comment

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

I suppose this is a PR to AWS's fork rather than this fork

@Paramadon Paramadon closed this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.