Skip to content

Commit

Permalink
update to opentelemetry v0.112.0 (#6)
Browse files Browse the repository at this point in the history
Signed-off-by: Bence Csati <[email protected]>
  • Loading branch information
csatib02 authored Oct 31, 2024
1 parent fd1153c commit 2893947
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 174 deletions.
6 changes: 3 additions & 3 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ type Config struct {
// DefaultLabelsEnabled is a map of default attributes to be added to each log record.
DefaultLabelsEnabled map[string]bool `mapstructure:"default_labels_enabled"`

exporterhelper.QueueSettings `mapstructure:"sending_queue"`
configretry.BackOffConfig `mapstructure:"retry_on_failure"`
exporterhelper.QueueConfig `mapstructure:"sending_queue"`
configretry.BackOffConfig `mapstructure:"retry_on_failure"`
}

var _ component.Config = (*Config)(nil)

// Validate checks if the configuration is valid
func (config *Config) Validate() error {
if err := config.QueueSettings.Validate(); err != nil {
if err := config.QueueConfig.Validate(); err != nil {
return fmt.Errorf("queue settings has invalid configuration: %w", err)
}

Expand Down
4 changes: 2 additions & 2 deletions config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestLoadConfigNewExporter(t *testing.T) {
RandomizationFactor: backoff.DefaultRandomizationFactor,
Multiplier: backoff.DefaultMultiplier,
},
QueueSettings: exporterhelper.QueueSettings{
QueueConfig: exporterhelper.QueueConfig{
Enabled: true,
NumConsumers: 2,
QueueSize: 10,
Expand Down Expand Up @@ -97,7 +97,7 @@ func TestConfigValidate(t *testing.T) {
}{
{
desc: "QueueSettings are invalid",
cfg: &Config{QueueSettings: exporterhelper.QueueSettings{QueueSize: -1, Enabled: true}},
cfg: &Config{QueueConfig: exporterhelper.QueueConfig{QueueSize: -1, Enabled: true}},
err: fmt.Errorf("queue settings has invalid configuration"),
},
{
Expand Down
6 changes: 3 additions & 3 deletions factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func createDefaultConfig() component.Config {
"instance": true,
},
BackOffConfig: configretry.NewDefaultBackOffConfig(),
QueueSettings: exporterhelper.NewDefaultQueueSettings(),
QueueConfig: exporterhelper.NewDefaultQueueConfig(),
}
}

Expand All @@ -68,9 +68,9 @@ func createLogsExporter(ctx context.Context, set exporter.Settings, config compo
config,
exp.pushLogData,
// explicitly disable since we rely on net.Dialer timeout logic.
exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}),
exporterhelper.WithTimeout(exporterhelper.TimeoutConfig{Timeout: 0}),
exporterhelper.WithRetry(exporterConfig.BackOffConfig),
exporterhelper.WithQueue(exporterConfig.QueueSettings),
exporterhelper.WithQueue(exporterConfig.QueueConfig),
exporterhelper.WithStart(exp.start),
exporterhelper.WithShutdown(exp.stop),
)
Expand Down
2 changes: 1 addition & 1 deletion factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func TestNewExporterFullConfig(t *testing.T) {
RandomizationFactor: backoff.DefaultRandomizationFactor,
Multiplier: backoff.DefaultMultiplier,
},
QueueSettings: exporterhelper.QueueSettings{
QueueConfig: exporterhelper.QueueConfig{
Enabled: true,
NumConsumers: 2,
QueueSize: 10,
Expand Down
66 changes: 28 additions & 38 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,34 +1,31 @@
module github.com/r0mdau/fluentforwardexporter

go 1.21.0
go 1.22.0

toolchain go1.22.5
toolchain go1.23.2

require (
github.com/IBM/fluent-forward-go v0.2.2
github.com/cenkalti/backoff/v4 v4.3.0
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/collector/component v0.107.0
go.opentelemetry.io/collector/config/configretry v1.13.0
go.opentelemetry.io/collector/config/configtls v1.12.0
go.opentelemetry.io/collector/confmap v0.107.0
go.opentelemetry.io/collector/exporter v0.107.0
go.opentelemetry.io/collector/pdata v1.13.0
go.opentelemetry.io/collector/component v0.112.0
go.opentelemetry.io/collector/config/configretry v1.18.0
go.opentelemetry.io/collector/config/configtls v1.18.0
go.opentelemetry.io/collector/confmap v1.18.0
go.opentelemetry.io/collector/exporter v0.112.0
go.opentelemetry.io/collector/pdata v1.18.0
go.uber.org/zap v1.27.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-viper/mapstructure/v2 v2.0.0 // indirect
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/knadh/koanf/maps v0.1.1 // indirect
github.com/knadh/koanf/providers/confmap v0.1.0 // indirect
Expand All @@ -37,35 +34,28 @@ require (
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/philhofer/fwd v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/tinylib/msgp v1.1.6 // indirect
go.opentelemetry.io/collector v0.107.0 // indirect
go.opentelemetry.io/collector/config/configopaque v1.12.0 // indirect
go.opentelemetry.io/collector/config/configtelemetry v0.107.0 // indirect
go.opentelemetry.io/collector/consumer v0.107.0 // indirect
go.opentelemetry.io/collector/consumer/consumerprofiles v0.107.0 // indirect
go.opentelemetry.io/collector/extension v0.107.0 // indirect
go.opentelemetry.io/collector/featuregate v1.13.0 // indirect
go.opentelemetry.io/collector/internal/globalgates v0.107.0 // indirect
go.opentelemetry.io/collector/pdata/pprofile v0.107.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
go.opentelemetry.io/collector/config/configopaque v1.18.0 // indirect
go.opentelemetry.io/collector/config/configtelemetry v0.112.0 // indirect
go.opentelemetry.io/collector/consumer v0.112.0 // indirect
go.opentelemetry.io/collector/consumer/consumererror v0.112.0 // indirect
go.opentelemetry.io/collector/extension v0.112.0 // indirect
go.opentelemetry.io/collector/extension/experimental/storage v0.112.0 // indirect
go.opentelemetry.io/collector/pdata/pprofile v0.112.0 // indirect
go.opentelemetry.io/collector/pipeline v0.112.0 // indirect
go.opentelemetry.io/otel v1.31.0 // indirect
go.opentelemetry.io/otel/metric v1.31.0 // indirect
go.opentelemetry.io/otel/sdk v1.31.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.31.0 // indirect
go.opentelemetry.io/otel/trace v1.31.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sys v0.23.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.17.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd // indirect
google.golang.org/grpc v1.67.1 // indirect
google.golang.org/protobuf v1.35.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 2893947

Please sign in to comment.