Skip to content

Commit f8d9143

Browse files
authored
fix(log-to-span): timestamp.Time should be called with milliseconds (#14196)
1 parent 18e9355 commit f8d9143

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎pkg/querier/queryrange/codec.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,8 @@ func (r *DetectedLabelsRequest) WithQuery(query string) queryrangebase.Request {
312312

313313
func (r *DetectedLabelsRequest) LogToSpan(sp opentracing.Span) {
314314
sp.LogFields(
315-
otlog.String("start", timestamp.Time(r.GetStart().UnixNano()).String()),
316-
otlog.String("end", timestamp.Time(r.GetEnd().UnixNano()).String()),
315+
otlog.String("start", timestamp.Time(r.GetStart().UnixMilli()).String()),
316+
otlog.String("end", timestamp.Time(r.GetEnd().UnixMilli()).String()),
317317
)
318318
}
319319

@@ -2359,8 +2359,8 @@ func (r *DetectedFieldsRequest) WithQuery(query string) queryrangebase.Request {
23592359

23602360
func (r *DetectedFieldsRequest) LogToSpan(sp opentracing.Span) {
23612361
sp.LogFields(
2362-
otlog.String("start", timestamp.Time(r.GetStart().UnixNano()).String()),
2363-
otlog.String("end", timestamp.Time(r.GetEnd().UnixNano()).String()),
2362+
otlog.String("start", timestamp.Time(r.GetStart().UnixMilli()).String()),
2363+
otlog.String("end", timestamp.Time(r.GetEnd().UnixMilli()).String()),
23642364
otlog.String("query", r.GetQuery()),
23652365
otlog.Int64("step (ms)", r.GetStep()),
23662366
otlog.Int64("line_limit", int64(r.GetLineLimit())),

0 commit comments

Comments
 (0)