From e829664d0c3e5a9bc94fda8e118444352f99eb75 Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Mon, 22 Apr 2024 09:56:57 -0700 Subject: [PATCH] [chore] update contrib to make compatible with core (#32577) **Description:** Update contrib to match core with the latest changes that are needed for https://github.com/open-telemetry/opentelemetry-collector/pull/9862 --- pkg/stanza/operator/parser/time/config.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/stanza/operator/parser/time/config.go b/pkg/stanza/operator/parser/time/config.go index 27b138f952d75..4e993acd9f15b 100644 --- a/pkg/stanza/operator/parser/time/config.go +++ b/pkg/stanza/operator/parser/time/config.go @@ -4,6 +4,7 @@ package time // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/time" import ( + "go.opentelemetry.io/collector/confmap" "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" @@ -35,6 +36,10 @@ type Config struct { helper.TimeParser `mapstructure:",omitempty,squash"` } +func (c *Config) Unmarshal(component *confmap.Conf) error { + return component.Unmarshal(c, confmap.WithIgnoreUnused()) +} + // Build will build a time parser operator. func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { transformerOperator, err := c.TransformerConfig.Build(logger)