Skip to content

Commit

Permalink
Fix small comments in exporter helper (#11650)
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
bogdandrutu authored Nov 14, 2024
1 parent 7ce4842 commit d660596
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion exporter/internal/queue/bounded_memory_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (q *boundedMemoryQueue[T]) Read(_ context.Context) (uint64, context.Context
return 0, item.ctx, item.req, ok
}

// Should be called to remove the item of the given index from the queue once processing is finished.
// OnProcessingFinished should be called to remove the item of the given index from the queue once processing is finished.
// For in memory queue, this function is noop.
func (q *boundedMemoryQueue[T]) OnProcessingFinished(uint64, error) {
}
Expand Down
2 changes: 1 addition & 1 deletion exporter/internal/queue/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type Queue[T any] interface {
// The function blocks until an item is available or if the queue is stopped.
// Returns false if reading failed or if the queue is stopped.
Read(context.Context) (uint64, context.Context, T, bool)
// Should be called to remove the item of the given index from the queue once processing is finished.
// OnProcessingFinished should be called to remove the item of the given index from the queue once processing is finished.
OnProcessingFinished(index uint64, consumeErr error)
}

Expand Down
4 changes: 2 additions & 2 deletions exporter/internal/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ type Request interface {
// sent. For example, for OTLP exporter, this value represents the number of spans,
// metric data points or log records.
ItemsCount() int
// Merge() is a function that merges this request with another one into a single request.
// Merge is a function that merges this request with another one into a single request.
// Do not mutate the requests passed to the function if error can be returned after mutation or if the exporter is
// marked as not mutable.
// 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.
Merge(context.Context, Request) (Request, error)
// MergeSplit() is a function that merge and/or splits this request with another one into multiple requests based on the
// MergeSplit is a function that merge and/or splits this request with another one into multiple requests based on the
// configured limit provided in MaxSizeConfig.
// All the returned requests MUST have a number of items that does not exceed the maximum number of items.
// Size of the last returned request MUST be less or equal than the size of any other returned request.
Expand Down

0 comments on commit d660596

Please sign in to comment.