Skip to content

Commit

Permalink
Override and escape component provided by controller. Close #826 (#840)
Browse files Browse the repository at this point in the history
Co-authored-by: Iliia Khaprov <[email protected]>
  • Loading branch information
knative-prow-robot and ikavgo authored Jun 28, 2022
1 parent eebe960 commit 203aa3d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/utils/envconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package utils
import (
"context"
"net/http"
"strings"

"go.uber.org/zap"
"knative.dev/pkg/logging"
Expand Down Expand Up @@ -72,7 +73,9 @@ func (e *EnvConfig) SetupMetrics(ctx context.Context) error {
if err != nil {
return err
}

if metricsConfig != nil {
metricsConfig.Component = strings.ReplaceAll(e.component, "-", "_")
if err := metrics.UpdateExporter(ctx, *metricsConfig, logger); err != nil {
return err
}
Expand Down

0 comments on commit 203aa3d

Please sign in to comment.