fix #25

Merged
emmatveev merged 1 commits from master into dev 2025-06-15 00:57:34 +03:00

View File

@ -15,9 +15,10 @@ import (
) )
func writeMetric(timestamp time.Time, endpoint string, statusCode int, responseTime int, method string) { func writeMetric(timestamp time.Time, endpoint string, statusCode int, responseTime int, method string) {
loc, _ := time.LoadLocation("Europe/Moscow")
s := fmt.Sprintf( s := fmt.Sprintf(
`{"timestamp":"%s","service":"queues","environment":"%s","endpoint":"%s","status_code":%s,"response_time":%s,"method":"%s"}`, `{"timestamp":"%s","service":"queues","environment":"%s","endpoint":"%s","status_code":%s,"response_time":%s,"method":"%s"}`,
timestamp.Format("2006-01-02T15:04:05Z"), timestamp.In(loc).Format("2006-01-02T15:04:05Z"),
os.Getenv("STAGE"), os.Getenv("STAGE"),
endpoint, endpoint,
strconv.Itoa(statusCode), strconv.Itoa(statusCode),