Skip to content

The result label of federatedhpa_pull_metrics_duration_seconds is bound with success #6300

@tangzhongren

Description

@tangzhongren

defer metrics.ObserveFederatedHPAPullMetricsLatency(err, "ResourceMetric", startTime)

defer metrics.ObserveFederatedHPAPullMetricsLatency(err, "RawMetric", startTime)

defer metrics.ObserveFederatedHPAPullMetricsLatency(err, "ObjectMetric", startTime)

defer metrics.ObserveFederatedHPAPullMetricsLatency(err, "ExternalMetric", startTime)

defer metrics.ObserveProcessFederatedHPALatency(err, startTime)

The defer statement has already assigned a value to the function's parameters when it is declared. Therefore, the value of the err parameter is always nil when the metrics function is executed. Regardless of whether the actual execution result is "success" or "error", the metrics record is always "success".

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions