Skip to content

Commit dc50db2

Browse files
committed
[awsfirehosereceiver/cwlogs] Correct comments
1 parent b4b04dc commit dc50db2

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

receiver/awsfirehosereceiver/internal/unmarshaler/unmarshalertest/nop_logs_unmarshaler.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package unmarshalertest // import "github.com/open-telemetry/opentelemetry-colle
55

66
import (
77
"go.opentelemetry.io/collector/pdata/plog"
8-
8+
99
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsfirehosereceiver/internal/unmarshaler"
1010
)
1111

@@ -18,13 +18,13 @@ type NopLogsUnmarshaler struct {
1818

1919
var _ unmarshaler.LogsUnmarshaler = (*NopLogsUnmarshaler)(nil)
2020

21-
// NewNopMetrics provides a nop logs unmarshaler with the default
21+
// NewNopLogs provides a nop logs unmarshaler with the default
2222
// plog.Logs and no error.
2323
func NewNopLogs() *NopLogsUnmarshaler {
2424
return &NopLogsUnmarshaler{}
2525
}
2626

27-
// NewWithMetrics provides a nop logs unmarshaler with the passed
27+
// NewWithLogs provides a nop logs unmarshaler with the passed
2828
// in logs as the result of the Unmarshal and no error.
2929
func NewWithLogs(logs plog.Logs) *NopLogsUnmarshaler {
3030
return &NopLogsUnmarshaler{logs: logs}

receiver/awsfirehosereceiver/logs_receiver.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ import (
1717
const defaultLogsRecordType = cwlog.TypeStr
1818

1919
// The logsConsumer implements the firehoseConsumer
20-
// to use a metrics consumer and unmarshaler.
20+
// to use a logs consumer and unmarshaler.
2121
type logsConsumer struct {
22-
// consumer passes the translated metrics on to the
22+
// consumer passes the translated logs on to the
2323
// next consumer.
2424
consumer consumer.Logs
2525
// unmarshaler is the configured LogsUnmarshaler
@@ -60,8 +60,7 @@ func newLogsReceiver(
6060
}
6161

6262
// Consume uses the configured unmarshaler to deserialize the records into a
63-
// single pmetric.Metrics. If there are common attributes available, then it will
64-
// attach those to each of the pcommon.Resources. It will send the final result
63+
// single plog.Logs. It will send the final result
6564
// to the next consumer.
6665
func (mc *logsConsumer) Consume(ctx context.Context, records [][]byte, commonAttributes map[string]string) (int, error) {
6766
md, err := mc.unmarshaler.Unmarshal(records)

0 commit comments

Comments
 (0)