Skip to content

Commit

Permalink
[chore] [exporterhelper] Update batch methods comments (#11513)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryax authored Oct 22, 2024
1 parent 6e12a02 commit dd573f3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions exporter/exporterhelper/logs_batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"go.opentelemetry.io/collector/pdata/plog"
)

// mergeLogs merges two logs requests into one.
// Merge merges the provided logs request into the current request and returns the merged request.
func (req *logsRequest) Merge(_ context.Context, r2 Request) (Request, error) {
lr2, ok2 := r2.(*logsRequest)
if !ok2 {
Expand All @@ -21,7 +21,8 @@ func (req *logsRequest) Merge(_ context.Context, r2 Request) (Request, error) {
return req, nil
}

// mergeSplitLogs splits and/or merges the logs into multiple requests based on the MaxSizeConfig.
// MergeSplit splits and/or merges the provided logs request and the current request into one or more requests
// conforming with the MaxSizeConfig.
func (req *logsRequest) MergeSplit(_ context.Context, cfg exporterbatcher.MaxSizeConfig, r2 Request) ([]Request, error) {
var (
res []Request
Expand Down
5 changes: 3 additions & 2 deletions exporter/exporterhelper/metrics_batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"go.opentelemetry.io/collector/pdata/pmetric"
)

// mergeMetrics merges two metrics requests into one.
// Merge merges the provided metrics request into the current request and returns the merged request.
func (req *metricsRequest) Merge(_ context.Context, r2 Request) (Request, error) {
mr2, ok2 := r2.(*metricsRequest)
if !ok2 {
Expand All @@ -21,7 +21,8 @@ func (req *metricsRequest) Merge(_ context.Context, r2 Request) (Request, error)
return req, nil
}

// mergeSplitMetrics splits and/or merges the metrics into multiple requests based on the MaxSizeConfig.
// MergeSplit splits and/or merges the provided metrics request and the current request into one or more requests
// conforming with the MaxSizeConfig.
func (req *metricsRequest) MergeSplit(_ context.Context, cfg exporterbatcher.MaxSizeConfig, r2 Request) ([]Request, error) {
var (
res []Request
Expand Down
5 changes: 3 additions & 2 deletions exporter/exporterhelper/traces_batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"go.opentelemetry.io/collector/pdata/ptrace"
)

// mergeTraces merges two traces requests into one.
// Merge merges the provided traces request into the current request and returns the merged request.
func (req *tracesRequest) Merge(_ context.Context, r2 Request) (Request, error) {
tr2, ok2 := r2.(*tracesRequest)
if !ok2 {
Expand All @@ -21,7 +21,8 @@ func (req *tracesRequest) Merge(_ context.Context, r2 Request) (Request, error)
return req, nil
}

// mergeSplitTraces splits and/or merges the traces into multiple requests based on the MaxSizeConfig.
// MergeSplit splits and/or merges the provided traces request and the current request into one or more requests
// conforming with the MaxSizeConfig.
func (req *tracesRequest) MergeSplit(_ context.Context, cfg exporterbatcher.MaxSizeConfig, r2 Request) ([]Request, error) {
var (
res []Request
Expand Down

0 comments on commit dd573f3

Please sign in to comment.