From 36da73ab0ac29437f9fb15bc91e55b4128ce831b Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Wed, 1 May 2024 16:56:05 -0700 Subject: [PATCH 1/2] Allow receivers/processors to know when the queue is full Signed-off-by: Bogdan Drutu --- .chloggen/expose-err-queue-full.yaml | 20 ++++++++++++++++++++ exporter/exporterqueue/queue.go | 5 +++++ 2 files changed, 25 insertions(+) create mode 100644 .chloggen/expose-err-queue-full.yaml diff --git a/.chloggen/expose-err-queue-full.yaml b/.chloggen/expose-err-queue-full.yaml new file mode 100644 index 00000000000..8454cd639b6 --- /dev/null +++ b/.chloggen/expose-err-queue-full.yaml @@ -0,0 +1,20 @@ +# 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: exporterqueu + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Expose ErrQueueIsFull so upstream components can retry or apply backpressure. + +# One or more tracking issues or pull requests related to the change +issues: [10070] + +# 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: [api] diff --git a/exporter/exporterqueue/queue.go b/exporter/exporterqueue/queue.go index d96bbd1455a..e97392097a3 100644 --- a/exporter/exporterqueue/queue.go +++ b/exporter/exporterqueue/queue.go @@ -11,6 +11,11 @@ import ( "go.opentelemetry.io/collector/exporter/internal/queue" ) +// ErrQueueIsFull is the error that Queue returns when full. +// Experimental: This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +var ErrQueueIsFull = queue.ErrQueueIsFull + // Queue defines a producer-consumer exchange which can be backed by e.g. the memory-based ring buffer queue // (boundedMemoryQueue) or via a disk-based queue (persistentQueue) // Experimental: This API is at the early stage of development and may change without backward compatibility From c04d346be158456eacdca253147296bf65bc70bf Mon Sep 17 00:00:00 2001 From: Dmitrii Anoshin Date: Wed, 1 May 2024 18:14:00 -0700 Subject: [PATCH 2/2] Update .chloggen/expose-err-queue-full.yaml Co-authored-by: Yang Song --- .chloggen/expose-err-queue-full.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.chloggen/expose-err-queue-full.yaml b/.chloggen/expose-err-queue-full.yaml index 8454cd639b6..13e55d9267a 100644 --- a/.chloggen/expose-err-queue-full.yaml +++ b/.chloggen/expose-err-queue-full.yaml @@ -4,7 +4,7 @@ change_type: enhancement # The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: exporterqueu +component: exporterqueue # A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). note: Expose ErrQueueIsFull so upstream components can retry or apply backpressure.