Skip to content

Commit

Permalink
fix(log-to-span): timestamp.Time should be called with milliseconds (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
svennergr authored Sep 19, 2024
1 parent 18e9355 commit f8d9143
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/querier/queryrange/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ func (r *DetectedLabelsRequest) WithQuery(query string) queryrangebase.Request {

func (r *DetectedLabelsRequest) LogToSpan(sp opentracing.Span) {
sp.LogFields(
otlog.String("start", timestamp.Time(r.GetStart().UnixNano()).String()),
otlog.String("end", timestamp.Time(r.GetEnd().UnixNano()).String()),
otlog.String("start", timestamp.Time(r.GetStart().UnixMilli()).String()),
otlog.String("end", timestamp.Time(r.GetEnd().UnixMilli()).String()),
)
}

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

func (r *DetectedFieldsRequest) LogToSpan(sp opentracing.Span) {
sp.LogFields(
otlog.String("start", timestamp.Time(r.GetStart().UnixNano()).String()),
otlog.String("end", timestamp.Time(r.GetEnd().UnixNano()).String()),
otlog.String("start", timestamp.Time(r.GetStart().UnixMilli()).String()),
otlog.String("end", timestamp.Time(r.GetEnd().UnixMilli()).String()),
otlog.String("query", r.GetQuery()),
otlog.Int64("step (ms)", r.GetStep()),
otlog.Int64("line_limit", int64(r.GetLineLimit())),
Expand Down

0 comments on commit f8d9143

Please sign in to comment.