SanitizeMetricName
SanitizeMetricName ensures the generates metric name is compatible with the underlying prometheus library.
def SanitizeMetricName(
name: string
) - > string
Ensures the generated metric name is compatible with the underlying Prometheus library. This function processes the input string to replace unsupported characters and maintain compatibility with Prometheus naming conventions.
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | The original metric name string to be sanitized. |
Returns
| Type | Description |
|---|---|
string | The sanitized metric name, suitable for use with Prometheus. |