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 logging for responses in each handler #110

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

WhitneyLampkin
Copy link

Description

This pull request introduces detailed logging for each handler. The primary goal is to enhance the observability and traceability of the application's behavior by providing comprehensive logs for each handler's response.

Changes

  • Implemented detailed logging for each handler to capture response details.
  • Ensured that sensitive information is not logged to maintain security and privacy.

Logging Enhancements

  • probe_metrics_list.go: Imported zap library and added logging to probeMetricsListHandler to log request details including method, status, and latency. [1] [2]
  • probe_metrics_resource.go: Imported zap library and added logging to probeMetricsResourceHandler to log request details including method, status, and latency. [1] [2]
  • probe_metrics_resourcegraph.go: Imported zap library and added logging to probeMetricsResourceGraphHandler to log request details including method, status, and latency. [1] [2]
  • probe_metrics_scrape.go: Imported zap library and added logging to probeMetricsScrapeHandler to log request details including method, status, and latency. [1] [2]
  • probe_metrics_subscription.go: Imported zap library and added logging to probeMetricsSubscriptionHandler to log request details including method, status, and latency. [1] [2]

Benefits

  • Improved debugging and troubleshooting capabilities by providing detailed logs.
  • Enhanced monitoring and alerting by capturing more granular information about handler responses.
  • Better insights into the application's performance and behavior.

Testing

  • Manually tested the new logging functionality to ensure it captures the response details accurately.
  • Verified that the new logging does not introduce any performance degradation during manual testing.
  • Ensured that all existing functionalities work as expected with the new logging in place.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
77.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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.

1 participant