format_metrics_instant_data | R Documentation |
Utility functions, usually called within the package and not exported.
format_metrics_instant_data(x)
format_metrics_range_data(x)
format_metadata(x)
rename_metadata_data_frame(x)
rename_metrics_data_frame(x)
destring(x)
parse_timeout(timeout_val)
response_check(response)
metrics_check(metric)
x |
A data frame generated by Prometheus query |
timeout_val |
A timeout value assigned by user. |
response |
httr response object |
metrics |
Generated metrics object |
Formats metrics data from the current query
Formats metrics data passed by range query.
Formats data passed by metadata query.
As there is no clarity with respect to the returned columns the function:
Changes names of known columns like target.instance, target.job
Removes special characters from all columns
As there is no clarity with respect to the returned columns the function:
Changes names of known columns like name
Removes special characters from all columns
The value
columns should always contain numerical values, the
function ensures that those are returned as of numeric
type.
parse_timeout
Fixes potentially problematic timeout argument.
Returns more meaningful error code
Check if metrics objects contains data. If there is no data for time period referenced in the query this function will return an error.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.