Skip to content

Commit

Permalink
splitting batch/memorylimiter processors into their own modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Boten committed Nov 2, 2022
1 parent 2257952 commit 5bed616
Show file tree
Hide file tree
Showing 15 changed files with 1,093 additions and 15 deletions.
22 changes: 22 additions & 0 deletions .chloggen/split-processor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
component: processor

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Splitting batch/memorylimiter processors into their own modules

# One or more tracking issues or pull requests related to the change
issues: [6188, 6192, 6193]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |-
The import path for the processor modules can now be access directly:
- `go.opentelemetry.io/collector/processor/batchprocessor`
- `go.opentelemetry.io/collector/processor/memorylimiter`
If using this processor, modify your Collector builder configuration to use `gomod` directly, such as:
- `gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.64.0`
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ updates:
directory: "/pdata"
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/processor/batchprocessor"
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/processor/memorylimiterprocessor"
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/receiver/otlpreceiver"
schedule:
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ check-contrib:
@$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/extension/ballastextension=$(CURDIR)/extension/ballastextension"
@$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/extension/zpagesextension=$(CURDIR)/extension/zpagesextension"
@$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/pdata=$(CURDIR)/pdata"
@$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/processor/batchprocessor=$(CURDIR)/processor/batchprocessor"
@$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/processor/memorylimiterprocessor=$(CURDIR)/processor/memorylimiterprocessor"
@$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/receiver/otlpreceiver=$(CURDIR)/receiver/otlpreceiver"
@$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/semconv=$(CURDIR)/semconv"
@$(MAKE) -C $(CONTRIB_PATH) -j2 gotidy
Expand All @@ -350,6 +352,8 @@ restore-contrib:
@$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/extension/ballastextension"
@$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/extension/zpagestextension"
@$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/pdata"
@$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/processor/batchprocessor"
@$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/processor/memorylimiterprocessor"
@$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/receiver/otlpreceiver"
@$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/semconv"
@$(MAKE) -C $(CONTRIB_PATH) -j2 gotidy
Expand Down
3 changes: 1 addition & 2 deletions cmd/builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ receivers:
- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.64.0

processors:
- import: go.opentelemetry.io/collector/processor/batchprocessor
gomod: go.opentelemetry.io/collector v0.40.0
- gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.64.0
EOF
$ builder --config=otelcol-builder.yaml --output-path=/tmp/dist
$ cat > /tmp/otelcol.yaml <<EOF
Expand Down
7 changes: 3 additions & 4 deletions cmd/builder/internal/config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ extensions:
- gomod: go.opentelemetry.io/collector/extension/ballastextension v0.63.1
- gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.63.1
processors:
- import: go.opentelemetry.io/collector/processor/batchprocessor
gomod: go.opentelemetry.io/collector v0.63.1
- import: go.opentelemetry.io/collector/processor/memorylimiterprocessor
gomod: go.opentelemetry.io/collector v0.63.1
- gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.63.1
- gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.63.1

10 changes: 5 additions & 5 deletions cmd/otelcorecol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ extensions:
- gomod: go.opentelemetry.io/collector/extension/ballastextension v0.63.1
- gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.63.1
processors:
- import: go.opentelemetry.io/collector/processor/batchprocessor
gomod: go.opentelemetry.io/collector v0.63.1
- import: go.opentelemetry.io/collector/processor/memorylimiterprocessor
gomod: go.opentelemetry.io/collector v0.63.1
- gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.63.1
- gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.63.1

replaces:
- go.opentelemetry.io/collector => ../../
Expand All @@ -27,6 +25,8 @@ replaces:
- go.opentelemetry.io/collector/exporter/otlphttpexporter => ../../exporter/otlphttpexporter
- go.opentelemetry.io/collector/extension/ballastextension => ../../extension/ballastextension
- go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension
- go.opentelemetry.io/collector/pdata => ../../pdata
- go.opentelemetry.io/collector/processor/batchprocessor => ../../processor/batchprocessor
- go.opentelemetry.io/collector/processor/memorylimiterprocessor => ../../processor/memorylimiterprocessor
- go.opentelemetry.io/collector/semconv => ../../semconv
- go.opentelemetry.io/collector/receiver/otlpreceiver => ../../receiver/otlpreceiver
- go.opentelemetry.io/collector/pdata => ../../pdata
10 changes: 8 additions & 2 deletions cmd/otelcorecol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ require (
go.opentelemetry.io/collector/exporter/otlphttpexporter v0.63.1
go.opentelemetry.io/collector/extension/ballastextension v0.63.1
go.opentelemetry.io/collector/extension/zpagesextension v0.63.1
go.opentelemetry.io/collector/processor/batchprocessor v0.63.1
go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.63.1
go.opentelemetry.io/collector/receiver/otlpreceiver v0.63.1
golang.org/x/sys v0.1.0
)
Expand Down Expand Up @@ -96,8 +98,12 @@ replace go.opentelemetry.io/collector/extension/ballastextension => ../../extens

replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension

replace go.opentelemetry.io/collector/pdata => ../../pdata

replace go.opentelemetry.io/collector/processor/batchprocessor => ../../processor/batchprocessor

replace go.opentelemetry.io/collector/processor/memorylimiterprocessor => ../../processor/memorylimiterprocessor

replace go.opentelemetry.io/collector/semconv => ../../semconv

replace go.opentelemetry.io/collector/receiver/otlpreceiver => ../../receiver/otlpreceiver

replace go.opentelemetry.io/collector/pdata => ../../pdata
7 changes: 5 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ require (
github.com/spf13/cobra v1.6.1
github.com/stretchr/testify v1.8.1
go.opencensus.io v0.23.0
go.opentelemetry.io/collector/extension/ballastextension v0.63.1
go.opentelemetry.io/collector/extension/zpagesextension v0.63.1
go.opentelemetry.io/collector/extension/ballastextension v0.0.0-00010101000000-000000000000
go.opentelemetry.io/collector/extension/zpagesextension v0.0.0-00010101000000-000000000000
go.opentelemetry.io/collector/pdata v0.63.1
go.opentelemetry.io/collector/processor/batchprocessor v0.0.0-00010101000000-000000000000
go.opentelemetry.io/collector/semconv v0.63.1
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.36.4
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.4
Expand Down Expand Up @@ -87,6 +88,8 @@ replace go.opentelemetry.io/collector/extension/ballastextension => ./extension/

replace go.opentelemetry.io/collector/extension/zpagesextension => ./extension/zpagesextension

replace go.opentelemetry.io/collector/processor/batchprocessor => ./processor/batchprocessor

retract (
v0.57.1 // Release failed, use v0.57.2
v0.57.0 // Release failed, use v0.57.2
Expand Down
1 change: 1 addition & 0 deletions processor/batchprocessor/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../Makefile.Common
43 changes: 43 additions & 0 deletions processor/batchprocessor/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
module go.opentelemetry.io/collector/processor/batchprocessor

go 1.18

require (
github.com/stretchr/testify v1.8.1
go.opencensus.io v0.23.0
go.opentelemetry.io/collector v0.63.1
go.opentelemetry.io/collector/pdata v0.63.1
go.uber.org/zap v1.23.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/knadh/koanf v1.4.4 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
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/pmezard/go-difflib v1.0.0 // indirect
go.opentelemetry.io/otel v1.11.1 // indirect
go.opentelemetry.io/otel/metric v0.33.0 // indirect
go.opentelemetry.io/otel/trace v1.11.1 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
google.golang.org/grpc v1.50.1 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace go.opentelemetry.io/collector => ../../

replace go.opentelemetry.io/collector/pdata => ../../pdata

replace go.opentelemetry.io/collector/semconv => ../../semconv
Loading

0 comments on commit 5bed616

Please sign in to comment.