@@ -11,7 +11,6 @@ import (
11
11
12
12
fclient "github.com/IBM/fluent-forward-go/fluent/client"
13
13
"github.com/IBM/fluent-forward-go/fluent/protocol"
14
- fproto "github.com/IBM/fluent-forward-go/fluent/protocol"
15
14
"go.opentelemetry.io/collector/component"
16
15
"go.opentelemetry.io/collector/pdata/pcommon"
17
16
"go.opentelemetry.io/collector/pdata/plog"
@@ -87,7 +86,7 @@ func (f *fluentforwardExporter) connectForward() {
87
86
88
87
func (f * fluentforwardExporter ) pushLogData (ctx context.Context , ld plog.Logs ) error {
89
88
// move for loops into a translator
90
- entries := []fproto .EntryExt {}
89
+ entries := []protocol .EntryExt {}
91
90
rls := ld .ResourceLogs ()
92
91
for i := 0 ; i < rls .Len (); i ++ {
93
92
ills := rls .At (i ).ScopeLogs ()
@@ -96,8 +95,8 @@ func (f *fluentforwardExporter) pushLogData(ctx context.Context, ld plog.Logs) e
96
95
logs := ills .At (j ).LogRecords ()
97
96
for k := 0 ; k < logs .Len (); k ++ {
98
97
log := logs .At (k )
99
- entry := fproto .EntryExt {
100
- Timestamp : fproto .EventTimeNow (),
98
+ entry := protocol .EntryExt {
99
+ Timestamp : protocol .EventTimeNow (),
101
100
Record : f .convertLogToMap (log , rls .At (i )),
102
101
}
103
102
entries = append (entries , entry )
@@ -176,7 +175,7 @@ func (f *fluentforwardExporter) convertLogToMap(lr plog.LogRecord, res plog.Reso
176
175
177
176
type sendFunc func (string , protocol.EntryList ) error
178
177
179
- func (f * fluentforwardExporter ) send (sendMethod sendFunc , entries []fproto .EntryExt ) error {
178
+ func (f * fluentforwardExporter ) send (sendMethod sendFunc , entries []protocol .EntryExt ) error {
180
179
err := sendMethod (f .config .Tag , entries )
181
180
// sometimes the connection is lost, we try to reconnect and send the data again
182
181
if err != nil {
@@ -193,10 +192,10 @@ func (f *fluentforwardExporter) send(sendMethod sendFunc, entries []fproto.Entry
193
192
return nil
194
193
}
195
194
196
- func (f * fluentforwardExporter ) sendCompressed (entries []fproto .EntryExt ) error {
195
+ func (f * fluentforwardExporter ) sendCompressed (entries []protocol .EntryExt ) error {
197
196
return f .send (f .client .SendCompressed , entries )
198
197
}
199
198
200
- func (f * fluentforwardExporter ) sendForward (entries []fproto .EntryExt ) error {
199
+ func (f * fluentforwardExporter ) sendForward (entries []protocol .EntryExt ) error {
201
200
return f .send (f .client .SendForward , entries )
202
201
}
0 commit comments