Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(collector): auth validator is nil #6442

Merged
merged 4 commits into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
package collector

import (
"strings"

"github.com/erda-project/erda-infra/base/logs"
"github.com/erda-project/erda-infra/base/servicehub"
"github.com/erda-project/erda-infra/providers/httpserver"
Expand Down Expand Up @@ -95,6 +97,15 @@
servicehub.Register(providerName, &servicehub.Spec{
Services: []string{providerName},
Description: "here is description of erda.oap.collector.receiver.collector",
DependenciesFunc: func(hub *servicehub.Hub) (list []string) {
hub.ForeachServices(func(service string) bool {
if strings.HasPrefix(service, "erda.oap.collector.authentication.") {
list = append(list, service)

Check warning on line 103 in internal/tools/monitor/oap/collector/plugins/receivers/collector/provider.go

View check run for this annotation

Codecov / codecov/patch

internal/tools/monitor/oap/collector/plugins/receivers/collector/provider.go#L101-L103

Added lines #L101 - L103 were not covered by tests
}
return true

Check warning on line 105 in internal/tools/monitor/oap/collector/plugins/receivers/collector/provider.go

View check run for this annotation

Codecov / codecov/patch

internal/tools/monitor/oap/collector/plugins/receivers/collector/provider.go#L105

Added line #L105 was not covered by tests
})
return list

Check warning on line 107 in internal/tools/monitor/oap/collector/plugins/receivers/collector/provider.go

View check run for this annotation

Codecov / codecov/patch

internal/tools/monitor/oap/collector/plugins/receivers/collector/provider.go#L107

Added line #L107 was not covered by tests
},
ConfigFunc: func() interface{} {
return &config{}
},
Expand Down
Loading