Skip to content

Commit

Permalink
Patch Release v1.35.1 (#1246)
Browse files Browse the repository at this point in the history
  • Loading branch information
Corbin Phelps authored Sep 22, 2023
2 parents b602ff4 + 98a88d8 commit 86e1495
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 48 deletions.
2 changes: 1 addition & 1 deletion cmd/plugindocgen/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/observiq/bindplane-agent/plugindocgen
go 1.20

require (
github.com/observiq/bindplane-agent/receiver/pluginreceiver v1.35.0
github.com/observiq/bindplane-agent/receiver/pluginreceiver v1.35.1
github.com/spf13/pflag v1.0.5
gopkg.in/yaml.v3 v3.0.1
)
Expand Down
5 changes: 5 additions & 0 deletions collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ func (c *collector) Run(ctx context.Context) error {
return errors.New("service already running")
}

// Register component telemetry before running to ensure a clean state for this run
if err := factories.RegisterComponentTelemetry(); err != nil {
return fmt.Errorf("register component telemetry: %w", err)
}

// The OT collector only supports using settings once during the lifetime
// of a single collector instance. We must remake the settings on each startup.
settings, err := NewSettings(c.configPaths, c.version, c.loggingOpts, c.factories)
Expand Down
29 changes: 15 additions & 14 deletions factories/factories.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,28 @@ func DefaultFactories() (otelcol.Factories, error) {
return combineFactories(defaultReceivers, defaultProcessors, defaultExporters, defaultExtensions, defaultConnectors)
}

// RegisterComponentTelemetry registers or re-registers components with telemetry so that any stale metrics are cleaned out.
func RegisterComponentTelemetry() error {
if err := throughputmeasurementprocessor.RegisterMetricViews(); err != nil {
return fmt.Errorf("failed to register throughput measurement processor telemetry: %w", err)
}

if err := throughputwrapper.RegisterMetricViews(); err != nil {
return fmt.Errorf("failed to register throughput wrapper telemetry: %w", err)
}

return nil
}

// combineFactories combines the supplied factories into a single Factories struct.
// Any errors encountered will also be combined into a single error.
func combineFactories(receivers []receiver.Factory, processors []processor.Factory,
exporters []exporter.Factory, extensions []extension.Factory,
connectors []connector.Factory) (otelcol.Factories, error) {
var errs []error

// Register component telemetry
if err := registerComponentTelemetry(); err != nil {
// Ensure component telemetry is registered at least once by having it in this method
if err := RegisterComponentTelemetry(); err != nil {
errs = append(errs, err)
}

Expand Down Expand Up @@ -89,15 +102,3 @@ func wrapReceivers(receivers []receiver.Factory) []receiver.Factory {

return wrappedReceivers
}

func registerComponentTelemetry() error {
if err := throughputmeasurementprocessor.RegisterMetricViews(); err != nil {
return fmt.Errorf("failed to register throughput measurement processor telemetry: %w", err)
}

if err := throughputwrapper.RegisterMetricViews(); err != nil {
return fmt.Errorf("failed to register throughput wrapper telemetry: %w", err)
}

return nil
}
42 changes: 21 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ go 1.20
require (
github.com/google/uuid v1.3.1
github.com/mholt/archiver/v3 v3.5.1
github.com/observiq/bindplane-agent/exporter/azureblobexporter v1.35.0
github.com/observiq/bindplane-agent/exporter/googlecloudexporter v1.35.0
github.com/observiq/bindplane-agent/exporter/googlemanagedprometheusexporter v1.35.0
github.com/observiq/bindplane-agent/packagestate v1.35.0
github.com/observiq/bindplane-agent/processor/datapointcountprocessor v1.35.0
github.com/observiq/bindplane-agent/processor/logcountprocessor v1.35.0
github.com/observiq/bindplane-agent/processor/logdeduplicationprocessor v1.35.0
github.com/observiq/bindplane-agent/processor/maskprocessor v1.35.0
github.com/observiq/bindplane-agent/processor/metricextractprocessor v1.35.0
github.com/observiq/bindplane-agent/processor/metricstatsprocessor v1.35.0
github.com/observiq/bindplane-agent/processor/removeemptyvaluesprocessor v1.35.0
github.com/observiq/bindplane-agent/processor/resourceattributetransposerprocessor v1.35.0
github.com/observiq/bindplane-agent/processor/samplingprocessor v1.35.0
github.com/observiq/bindplane-agent/processor/spancountprocessor v1.35.0
github.com/observiq/bindplane-agent/processor/throughputmeasurementprocessor v1.35.0
github.com/observiq/bindplane-agent/receiver/m365receiver v1.35.0
github.com/observiq/bindplane-agent/receiver/pluginreceiver v1.35.0
github.com/observiq/bindplane-agent/receiver/routereceiver v1.35.0
github.com/observiq/bindplane-agent/receiver/sapnetweaverreceiver v1.35.0
github.com/observiq/bindplane-agent/exporter/azureblobexporter v1.35.1
github.com/observiq/bindplane-agent/exporter/googlecloudexporter v1.35.1
github.com/observiq/bindplane-agent/exporter/googlemanagedprometheusexporter v1.35.1
github.com/observiq/bindplane-agent/packagestate v1.35.1
github.com/observiq/bindplane-agent/processor/datapointcountprocessor v1.35.1
github.com/observiq/bindplane-agent/processor/logcountprocessor v1.35.1
github.com/observiq/bindplane-agent/processor/logdeduplicationprocessor v1.35.1
github.com/observiq/bindplane-agent/processor/maskprocessor v1.35.1
github.com/observiq/bindplane-agent/processor/metricextractprocessor v1.35.1
github.com/observiq/bindplane-agent/processor/metricstatsprocessor v1.35.1
github.com/observiq/bindplane-agent/processor/removeemptyvaluesprocessor v1.35.1
github.com/observiq/bindplane-agent/processor/resourceattributetransposerprocessor v1.35.1
github.com/observiq/bindplane-agent/processor/samplingprocessor v1.35.1
github.com/observiq/bindplane-agent/processor/spancountprocessor v1.35.1
github.com/observiq/bindplane-agent/processor/throughputmeasurementprocessor v1.35.1
github.com/observiq/bindplane-agent/receiver/m365receiver v1.35.1
github.com/observiq/bindplane-agent/receiver/pluginreceiver v1.35.1
github.com/observiq/bindplane-agent/receiver/routereceiver v1.35.1
github.com/observiq/bindplane-agent/receiver/sapnetweaverreceiver v1.35.1
github.com/oklog/ulid/v2 v2.1.0
github.com/open-telemetry/opamp-go v0.2.0
github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector v0.85.0
Expand Down Expand Up @@ -222,8 +222,8 @@ require (
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 // indirect
github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 // indirect
github.com/observiq/bindplane-agent/counter v1.35.0 // indirect
github.com/observiq/bindplane-agent/expr v1.35.0 // indirect
github.com/observiq/bindplane-agent/counter v1.35.1 // indirect
github.com/observiq/bindplane-agent/expr v1.35.1 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.85.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor v0.85.0 // indirect
github.com/outcaste-io/ristretto v0.2.1 // indirect
Expand Down
6 changes: 3 additions & 3 deletions processor/datapointcountprocessor/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module github.com/observiq/bindplane-agent/processor/datapointcountprocessor
go 1.20

require (
github.com/observiq/bindplane-agent/counter v1.35.0
github.com/observiq/bindplane-agent/expr v1.35.0
github.com/observiq/bindplane-agent/receiver/routereceiver v1.35.0
github.com/observiq/bindplane-agent/counter v1.35.1
github.com/observiq/bindplane-agent/expr v1.35.1
github.com/observiq/bindplane-agent/receiver/routereceiver v1.35.1
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.85.0
github.com/stretchr/testify v1.8.4
go.opentelemetry.io/collector/component v0.85.0
Expand Down
6 changes: 3 additions & 3 deletions processor/logcountprocessor/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module github.com/observiq/bindplane-agent/processor/logcountprocessor
go 1.20

require (
github.com/observiq/bindplane-agent/counter v1.35.0
github.com/observiq/bindplane-agent/expr v1.35.0
github.com/observiq/bindplane-agent/receiver/routereceiver v1.35.0
github.com/observiq/bindplane-agent/counter v1.35.1
github.com/observiq/bindplane-agent/expr v1.35.1
github.com/observiq/bindplane-agent/receiver/routereceiver v1.35.1
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.85.0
github.com/stretchr/testify v1.8.4
go.opentelemetry.io/collector/component v0.85.0
Expand Down
4 changes: 2 additions & 2 deletions processor/metricextractprocessor/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/observiq/bindplane-agent/processor/metricextractprocessor
go 1.20

require (
github.com/observiq/bindplane-agent/expr v1.35.0
github.com/observiq/bindplane-agent/receiver/routereceiver v1.35.0
github.com/observiq/bindplane-agent/expr v1.35.1
github.com/observiq/bindplane-agent/receiver/routereceiver v1.35.1
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.85.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.85.0
github.com/stretchr/testify v1.8.4
Expand Down
6 changes: 3 additions & 3 deletions processor/spancountprocessor/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module github.com/observiq/bindplane-agent/processor/spancountprocessor
go 1.20

require (
github.com/observiq/bindplane-agent/counter v1.35.0
github.com/observiq/bindplane-agent/expr v1.35.0
github.com/observiq/bindplane-agent/receiver/routereceiver v1.35.0
github.com/observiq/bindplane-agent/counter v1.35.1
github.com/observiq/bindplane-agent/expr v1.35.1
github.com/observiq/bindplane-agent/receiver/routereceiver v1.35.1
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.85.0
github.com/stretchr/testify v1.8.4
go.opentelemetry.io/collector/component v0.85.0
Expand Down
2 changes: 1 addition & 1 deletion updater/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/observiq/bindplane-agent/packagestate v1.35.0
github.com/observiq/bindplane-agent/packagestate v1.35.1
github.com/open-telemetry/opamp-go v0.2.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
Expand Down

0 comments on commit 86e1495

Please sign in to comment.