Salman
02/01/2023, 5:16 PMPranay
02/01/2023, 5:43 PMAmol Umbark
02/02/2023, 5:00 AMSalman
02/02/2023, 12:34 PMAmol Umbark
02/02/2023, 2:13 PMSalman
02/03/2023, 4:12 AMSELECT
count() over(partition by serviceName) as value,
toStartOfInterval(timestamp, toIntervalMinute(1)) AS interval,
serviceName,
groupID groupId,
errorID errorId,
traceID traceId,
spanID spanId,
exceptionMessage message,
exceptionStacktrace stacktrace,
timestamp
FROM signoz_traces.distributed_signoz_error_index_v2
WHERE exceptionType = 'error'
-- WHERE exceptionType = 'warning'
AND timestamp BETWEEN {{.start_datetime}} AND {{.end_datetime}};
/error-detail?groupId=${groupId}×tamp=${timestamp}
where ${timestamp}
is go nanoseconds.
Timestamp stored in db is in this format: 2023-02-03 02:03:08.279049
By default, the value of timestamp
in alert payload drops milliseconds. For example, 2023-02-03 02:03:08.279049
becomes 2023-02-03 02:03:08
.
I suppose, you need to convert {{.Labels.timestamp}}
to go nanoseconds. I am not sure if there is a function that you could apply in go template to get that value.