Skip to content

Commit

Permalink
fix: fix typo
Browse files Browse the repository at this point in the history
Signed-off-by: niejiangang <niejiangang@harmonycloud.cn>
  • Loading branch information
NeJan2020 committed Jun 13, 2022
1 parent 790e1e5 commit 3adf287
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions collector/observability/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@ func (h *otelLoggerHandler) Handle(err error) {
h.logger.Warn("Opentelemetry-go encountered an error: ", zap.Error(err))
}

func RegisterExterMetrics(selectors []string, mp metric.MeterProvider) {
func RegisterExtraMetrics(selectors []string, mp metric.MeterProvider) {
for _, selector := range selectors {
switch selector {
case resourcePerformance:
regsiterAgentResourcePerformanceMetrics(mp)
registerAgentResourcePerformanceMetrics(mp)
}
}
}

func regsiterAgentResourcePerformanceMetrics(mp metric.MeterProvider) (err error) {
func registerAgentResourcePerformanceMetrics(mp metric.MeterProvider) (err error) {
proc, _ := process.NewProcess(int32(os.Getpid()))
meter := mp.Meter("kindling")
selfTelemetryOnce.Do(func() {
Expand Down Expand Up @@ -141,7 +141,7 @@ func InitTelemetry(logger *zap.Logger, config *Config) (metric.MeterProvider, er
}()

mp := exp.MeterProvider()
RegisterExterMetrics(config.PromCfg.ExtraMetrics, mp)
RegisterExtraMetrics(config.PromCfg.ExtraMetrics, mp)
return mp, nil
} else {
var collectPeriod time.Duration
Expand Down

0 comments on commit 3adf287

Please sign in to comment.