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

utils/golden: support diff of Prometheus Metrics from api server #369

Merged
merged 1 commit into from
Aug 30, 2023

Conversation

Choraden
Copy link
Contributor

This patch adds support of reading, parsing and comparing prometheus metrics from http server.

@what-the-diff
Copy link

what-the-diff bot commented Aug 22, 2023

PR Summary

  • Expanded capabilities of utils/golden/prometheus.go module
    The additions to this section of code are focused on enhancing data gathering and parsing related to Prometheus metrics. These changes should boost the flexibility and efficiency of dealing with data from various sources.

  • Integration of key libraries
    This update includes the integration of several critical libraries (io, net/http, net/url, and time). This collaboration expands the toolset our software can use, improving its ability to handle various tasks - like better network communication, working with URLs, and managing time-related tasks.

  • Addition of the function DiffPrometheusMetricsHTTP
    An agile new feature, it takes a URL and additional filters to refine the scope of data collection. This function fetches data from the specified URL allowing our software to interact and pull data from external web resources more effectively.

  • Introduction of parseMetricFamilies function
    A new parsing function was developed specifically to handle Prometheus metric families' data. By adding this function, data culled from Prometheus can be analyzed and classified more efficiently inside our software.

  • Inclusion of gatherer struct and its methods
    The 'gatherer' structure and its functionalities are introduced in this pull request. It's designed to wrap the parsed 'metric families' data. This extra layer of functionality enables us to manage, organize, and access our parsed data better. Notably, the gatherer.Gather method returns the encapsulated data, promoting simplified access and usage of processed information.

@mmatczuk mmatczuk merged commit ea3479c into main Aug 30, 2023
@mmatczuk mmatczuk deleted the hg/metrics-parser branch August 30, 2023 09:17
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