Skip to content

Commit 419cd55

Browse files
committed
chore
Signed-off-by: Bence Csati <bence.csati@axoflow.com>
1 parent 9dbb6dd commit 419cd55

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

exporter.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111

1212
fclient "github.com/IBM/fluent-forward-go/fluent/client"
1313
"github.com/IBM/fluent-forward-go/fluent/protocol"
14-
fproto "github.com/IBM/fluent-forward-go/fluent/protocol"
1514
"go.opentelemetry.io/collector/component"
1615
"go.opentelemetry.io/collector/pdata/pcommon"
1716
"go.opentelemetry.io/collector/pdata/plog"
@@ -87,7 +86,7 @@ func (f *fluentforwardExporter) connectForward() {
8786

8887
func (f *fluentforwardExporter) pushLogData(ctx context.Context, ld plog.Logs) error {
8988
// move for loops into a translator
90-
entries := []fproto.EntryExt{}
89+
entries := []protocol.EntryExt{}
9190
rls := ld.ResourceLogs()
9291
for i := 0; i < rls.Len(); i++ {
9392
ills := rls.At(i).ScopeLogs()
@@ -96,8 +95,8 @@ func (f *fluentforwardExporter) pushLogData(ctx context.Context, ld plog.Logs) e
9695
logs := ills.At(j).LogRecords()
9796
for k := 0; k < logs.Len(); k++ {
9897
log := logs.At(k)
99-
entry := fproto.EntryExt{
100-
Timestamp: fproto.EventTimeNow(),
98+
entry := protocol.EntryExt{
99+
Timestamp: protocol.EventTimeNow(),
101100
Record: f.convertLogToMap(log, rls.At(i)),
102101
}
103102
entries = append(entries, entry)
@@ -176,7 +175,7 @@ func (f *fluentforwardExporter) convertLogToMap(lr plog.LogRecord, res plog.Reso
176175

177176
type sendFunc func(string, protocol.EntryList) error
178177

179-
func (f *fluentforwardExporter) send(sendMethod sendFunc, entries []fproto.EntryExt) error {
178+
func (f *fluentforwardExporter) send(sendMethod sendFunc, entries []protocol.EntryExt) error {
180179
err := sendMethod(f.config.Tag, entries)
181180
// sometimes the connection is lost, we try to reconnect and send the data again
182181
if err != nil {
@@ -193,10 +192,10 @@ func (f *fluentforwardExporter) send(sendMethod sendFunc, entries []fproto.Entry
193192
return nil
194193
}
195194

196-
func (f *fluentforwardExporter) sendCompressed(entries []fproto.EntryExt) error {
195+
func (f *fluentforwardExporter) sendCompressed(entries []protocol.EntryExt) error {
197196
return f.send(f.client.SendCompressed, entries)
198197
}
199198

200-
func (f *fluentforwardExporter) sendForward(entries []fproto.EntryExt) error {
199+
func (f *fluentforwardExporter) sendForward(entries []protocol.EntryExt) error {
201200
return f.send(f.client.SendForward, entries)
202201
}

factory.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func createLogsExporter(ctx context.Context, set exporter.Settings, config compo
6262
exporterConfig := config.(*Config)
6363
exp := newExporter(exporterConfig, set.TelemetrySettings)
6464

65-
return exporterhelper.NewLogsExporter(
65+
return exporterhelper.NewLogs(
6666
ctx,
6767
set,
6868
config,

0 commit comments

Comments
 (0)