Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] [exporterhelper] Update batch methods comments #11513

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading