diff --git a/.chloggen/enable-sizer.yaml b/.chloggen/enable-sizer.yaml new file mode 100644 index 00000000000..afb8ec4c598 --- /dev/null +++ b/.chloggen/enable-sizer.yaml @@ -0,0 +1,25 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: exporterhelper + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Enable items and bytes sizers for persistent queue + +# One or more tracking issues or pull requests related to the change +issues: [12881] + +# (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: + +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [user] diff --git a/exporter/exporterhelper/internal/queuebatch/config.go b/exporter/exporterhelper/internal/queuebatch/config.go index 907a9512e06..612c25072fb 100644 --- a/exporter/exporterhelper/internal/queuebatch/config.go +++ b/exporter/exporterhelper/internal/queuebatch/config.go @@ -66,11 +66,6 @@ func (cfg *Config) Validate() error { return errors.New("`wait_for_result` is not supported with a persistent queue configured with `storage`") } - // Only support request sizer for persistent queue at this moment. - if cfg.StorageID != nil && cfg.Sizer != request.SizerTypeRequests { - return errors.New("persistent queue configured with `storage` only supports `requests` sizer") - } - if cfg.Batch != nil { // Only support items or bytes sizer for batch at this moment. if cfg.Sizer != request.SizerTypeItems && cfg.Sizer != request.SizerTypeBytes { diff --git a/exporter/exporterhelper/internal/queuebatch/config_test.go b/exporter/exporterhelper/internal/queuebatch/config_test.go index ee38d1c97a7..96f16aaa6fe 100644 --- a/exporter/exporterhelper/internal/queuebatch/config_test.go +++ b/exporter/exporterhelper/internal/queuebatch/config_test.go @@ -35,16 +35,6 @@ func TestConfig_Validate(t *testing.T) { cfg.StorageID = &storageID require.EqualError(t, cfg.Validate(), "`wait_for_result` is not supported with a persistent queue configured with `storage`") - cfg = newTestConfig() - cfg.Sizer = request.SizerTypeBytes - cfg.StorageID = &storageID - require.EqualError(t, cfg.Validate(), "persistent queue configured with `storage` only supports `requests` sizer") - - cfg = newTestConfig() - cfg.Sizer = request.SizerTypeItems - cfg.StorageID = &storageID - require.EqualError(t, cfg.Validate(), "persistent queue configured with `storage` only supports `requests` sizer") - cfg = newTestConfig() cfg.Sizer = request.SizerTypeRequests require.EqualError(t, cfg.Validate(), "`batch` supports only `items` or `bytes` sizer")