Skip to content

Commit

Permalink
extract profiles exporter helper into its own module
Browse files Browse the repository at this point in the history
  • Loading branch information
dmathieu committed Sep 12, 2024
1 parent ac925ba commit cb0a2a3
Show file tree
Hide file tree
Showing 55 changed files with 1,512 additions and 1,127 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ check-contrib:
-replace go.opentelemetry.io/collector/consumer/consumererror/consumererrorprofiles=$(CURDIR)/consumer/consumererror/consumererrorprofiles \
-replace go.opentelemetry.io/collector/consumer/consumertest=$(CURDIR)/consumer/consumertest \
-replace go.opentelemetry.io/collector/exporter=$(CURDIR)/exporter \
-replace go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles=$(CURDIR)/exporter/exporterhelper/exporterhelperprofiles \
-replace go.opentelemetry.io/collector/exporter/debugexporter=$(CURDIR)/exporter/debugexporter \
-replace go.opentelemetry.io/collector/exporter/exporterprofiles=$(CURDIR)/exporter/exporterprofiles \
-replace go.opentelemetry.io/collector/exporter/loggingexporter=$(CURDIR)/exporter/loggingexporter \
Expand Down Expand Up @@ -360,6 +361,7 @@ restore-contrib:
-dropreplace go.opentelemetry.io/collector/consumer/consumererror/consumererrorprofiles \
-dropreplace go.opentelemetry.io/collector/consumer/consumertest \
-dropreplace go.opentelemetry.io/collector/exporter \
-dropreplace go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles \
-dropreplace go.opentelemetry.io/collector/exporter/debugexporter \
-dropreplace go.opentelemetry.io/collector/exporter/loggingexporter \
-dropreplace go.opentelemetry.io/collector/exporter/nopexporter \
Expand Down
1 change: 1 addition & 0 deletions cmd/builder/internal/builder/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ var (
"/exporter",
"/exporter/debugexporter",
"/exporter/exporterprofiles",
"/exporter/exporterhelper/exporterhelperprofiles",
"/exporter/nopexporter",
"/exporter/otlpexporter",
"/exporter/otlphttpexporter",
Expand Down
1 change: 1 addition & 0 deletions cmd/otelcorecol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ replaces:
- go.opentelemetry.io/collector/exporter => ../../exporter
- go.opentelemetry.io/collector/exporter/debugexporter => ../../exporter/debugexporter
- go.opentelemetry.io/collector/exporter/exporterprofiles => ../../exporter/exporterprofiles
- go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles => ../../exporter/exporterhelper/exporterhelperprofiles
- go.opentelemetry.io/collector/exporter/loggingexporter => ../../exporter/loggingexporter
- go.opentelemetry.io/collector/exporter/nopexporter => ../../exporter/nopexporter
- go.opentelemetry.io/collector/exporter/otlpexporter => ../../exporter/otlpexporter
Expand Down
5 changes: 4 additions & 1 deletion cmd/otelcorecol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module go.opentelemetry.io/collector/cmd/otelcorecol

go 1.22.0

toolchain go1.23.1
toolchain go1.22.7

require (
go.opentelemetry.io/collector/component v0.109.0
Expand Down Expand Up @@ -98,6 +98,7 @@ require (
go.opentelemetry.io/collector/consumer/consumererror/consumererrorprofiles v0.0.0-00010101000000-000000000000 // indirect
go.opentelemetry.io/collector/consumer/consumerprofiles v0.109.0 // indirect
go.opentelemetry.io/collector/consumer/consumertest v0.109.0 // indirect
go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles v0.0.0-00010101000000-000000000000 // indirect
go.opentelemetry.io/collector/exporter/exporterprofiles v0.109.0 // indirect
go.opentelemetry.io/collector/extension/auth v0.109.0 // indirect
go.opentelemetry.io/collector/extension/experimental/storage v0.109.0 // indirect
Expand Down Expand Up @@ -213,6 +214,8 @@ replace go.opentelemetry.io/collector/exporter/debugexporter => ../../exporter/d

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

replace go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles => ../../exporter/exporterhelper/exporterhelperprofiles

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

replace go.opentelemetry.io/collector/exporter/nopexporter => ../../exporter/nopexporter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestProfiles(t *testing.T) {
var target Profiles
assert.False(t, errors.As(nil, &target))
assert.False(t, errors.As(err, &target))
assert.True(t, errors.As(profileErr, &target))
assert.ErrorAs(t, profileErr, &target)
assert.Equal(t, td, target.Data())
}

Expand All @@ -33,7 +33,7 @@ func TestProfiles_Unwrap(t *testing.T) {
target := testErrorType{}
require.NotEqual(t, err, target)
// Unwrapping profileErr for err and assigning to target.
require.True(t, errors.As(profileErr, &target))
require.ErrorAs(t, profileErr, &target)
require.Equal(t, err, target)
}

Expand Down
6 changes: 0 additions & 6 deletions exporter/debugexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ require (
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.59.1 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
go.opentelemetry.io/collector/component/componentprofiles v0.109.0 // indirect
go.opentelemetry.io/collector/config/configretry v1.15.0 // indirect
go.opentelemetry.io/collector/consumer/consumererror/consumererrorprofiles v0.0.0-00010101000000-000000000000 // indirect
go.opentelemetry.io/collector/consumer/consumerprofiles v0.109.0 // indirect
go.opentelemetry.io/collector/consumer/consumertest v0.109.0 // indirect
go.opentelemetry.io/collector/exporter/exporterprofiles v0.109.0 // indirect
Expand Down Expand Up @@ -93,12 +91,8 @@ replace go.opentelemetry.io/collector/config/configretry => ../../config/configr

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

replace go.opentelemetry.io/collector/consumer/consumererror/consumererrorprofiles => ../../consumer/consumererror/consumererrorprofiles

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

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

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

replace go.opentelemetry.io/collector/component/componentprofiles => ../../component/componentprofiles
Loading

0 comments on commit cb0a2a3

Please sign in to comment.