-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Persistent storage in queued_retry, backed by file storage extension (#…
…3274) Persistent queue implementation within queued_retry, aimed at being compatible with Jager's [BoundedQueue](https://github.com/jaegertracing/jaeger/blob/master/pkg/queue/bounded_queue.go) interface (providing a simple replacement) and backed by [file storage extension](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/storage/filestorage) for storing WAL. Currently, to run the persistent queue, OpenTelemetry Collector Contrib with `enable_unstable` build tag is required. **Link to tracking Issue:** #2285 [Design doc](https://docs.google.com/document/d/1Y4vNthCGdYI61ezeAzL5dXWgiZ73y9eSjIDitk3zXsU/edit#) **Testing:** Unit Tests and manual testing, more to come **Documentation:** README.md updated, including an example
- Loading branch information
Showing
21 changed files
with
2,035 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package exporterhelper | ||
|
||
// consumersQueue is largely based on queue.BoundedQueue and matches the subset used in the collector | ||
// It describes a producer-consumer exchange which can be backed by e.g. the memory-based ring buffer queue | ||
// (queue.BoundedQueue) or via disk-based queue (persistentQueue) | ||
type consumersQueue interface { | ||
// StartConsumers starts a given number of goroutines consuming items from the queue | ||
// and passing them into the consumer callback. | ||
StartConsumers(num int, callback func(item interface{})) | ||
// Produce is used by the producer to submit new item to the queue. Returns false if the item wasn't added | ||
// to the queue due to queue overflow. | ||
Produce(item interface{}) bool | ||
// Stop stops all consumers, as well as the length reporter if started, | ||
// and releases the items channel. It blocks until all consumers have stopped. | ||
Stop() | ||
// Size returns the current Size of the queue | ||
Size() int | ||
} |
Oops, something went wrong.