Skip to content

Commit

Permalink
take timestamp from raw input data, not from field
Browse files Browse the repository at this point in the history
  • Loading branch information
athornton committed Sep 7, 2023
1 parent 8525fe8 commit 26a2140
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/parsers/avro/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func (p *Parser) createMetric(data map[string]interface{}, schema string) (teleg
}
var timestamp time.Time
if p.Timestamp != "" {
rawTime := fmt.Sprintf("%v", fields[p.Timestamp])
rawTime := fmt.Sprintf("%v", data[p.Timestamp])
var err error
timestamp, err = internal.ParseTimestamp(p.TimestampFormat, rawTime, nil)
if err != nil {
Expand Down

0 comments on commit 26a2140

Please sign in to comment.