Skip to content

Commit 2f53f72

Browse files
committed
Add log line for skipped components
1 parent 03235a8 commit 2f53f72

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/pkg/otel/translate/otelconfig.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,14 @@ func VerifyComponentIsOtelSupported(comp *component.Component) error {
116116
}
117117

118118
// getSupportedComponents returns components from the given model that can be run in an Otel Collector.
119-
func getSupportedComponents(model *component.Model) []*component.Component {
119+
func getSupportedComponents(model *component.Model, logger *logp.Logger) []*component.Component {
120120
var supportedComponents []*component.Component
121121

122122
for _, comp := range model.Components {
123-
if VerifyComponentIsOtelSupported(&comp) == nil {
123+
if err := VerifyComponentIsOtelSupported(&comp); err == nil {
124124
supportedComponents = append(supportedComponents, &comp)
125+
} else {
126+
logger.Errorf("unsupported component %s submitted to otel manager, skipping: %v", comp.ID, err)
125127
}
126128
}
127129

0 commit comments

Comments
 (0)