Skip to content

Commit

Permalink
Resolved conflict with new tests. [Refs #152]
Browse files Browse the repository at this point in the history
  • Loading branch information
ladenedge committed Dec 5, 2023
1 parent c1950ad commit d2d9698
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions pkg/otlp/logs/logs_translator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,31 @@ func TestTransform(t *testing.T) {
},
},
},
{
name: "Timestamps are formatted properly",
args: args{
lr: func() plog.LogRecord {
l := plog.NewLogRecord()
l.SetTimestamp(pcommon.Timestamp(uint64(1700499303397000000)))
l.SetSeverityNumber(5)
return l
}(),
res: func() pcommon.Resource {
r := pcommon.NewResource()
return r
}(),
},
want: datadogV2.HTTPLogItem{
Ddtags: datadog.PtrString(""),
Message: *datadog.PtrString(""),
AdditionalProperties: map[string]string{
"status": "debug",
otelSeverityNumber: "5",
ddTimestamp: "2023-11-20T16:55:03.397Z",
otelTimestamp: "1700499303397000000",
},
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit d2d9698

Please sign in to comment.