Skip to content

Commit

Permalink
[chore] update contrib to make compatible with core (#32577)
Browse files Browse the repository at this point in the history
**Description:**
Update contrib to match core with the latest changes that are needed for
open-telemetry/opentelemetry-collector#9862
  • Loading branch information
atoulme committed Apr 22, 2024
1 parent 1a5e38b commit e829664
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/stanza/operator/parser/time/config.go
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e829664

Please sign in to comment.