Skip to content

Commit dd573f3

Browse files
authoredOct 22, 2024··
[chore] [exporterhelper] Update batch methods comments (#11513)
1 parent 6e12a02 commit dd573f3

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed
 

‎exporter/exporterhelper/logs_batch.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"go.opentelemetry.io/collector/pdata/plog"
1212
)
1313

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

24-
// mergeSplitLogs splits and/or merges the logs into multiple requests based on the MaxSizeConfig.
24+
// MergeSplit splits and/or merges the provided logs request and the current request into one or more requests
25+
// conforming with the MaxSizeConfig.
2526
func (req *logsRequest) MergeSplit(_ context.Context, cfg exporterbatcher.MaxSizeConfig, r2 Request) ([]Request, error) {
2627
var (
2728
res []Request

‎exporter/exporterhelper/metrics_batch.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"go.opentelemetry.io/collector/pdata/pmetric"
1212
)
1313

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

24-
// mergeSplitMetrics splits and/or merges the metrics into multiple requests based on the MaxSizeConfig.
24+
// MergeSplit splits and/or merges the provided metrics request and the current request into one or more requests
25+
// conforming with the MaxSizeConfig.
2526
func (req *metricsRequest) MergeSplit(_ context.Context, cfg exporterbatcher.MaxSizeConfig, r2 Request) ([]Request, error) {
2627
var (
2728
res []Request

‎exporter/exporterhelper/traces_batch.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"go.opentelemetry.io/collector/pdata/ptrace"
1212
)
1313

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

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

0 commit comments

Comments
 (0)
Please sign in to comment.