Skip to content

Commit

Permalink
[chore] update contrib to make compatible with core
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme committed Apr 21, 2024
1 parent 6f844ed commit dde09d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/stanza/operator/input/tcp/config.go
Expand Up @@ -140,7 +140,7 @@ func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) {
}

if c.TLS != nil {
tcpInput.tls, err = c.TLS.LoadTLSConfig(context.Background())
tcpInput.tls, err = c.TLS.LoadTLSConfigContext(context.Background())
if err != nil {
return nil, err
}
Expand Down
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 dde09d4

Please sign in to comment.