Merge pull request 'fix' (#25) from master into dev

Reviewed-on: https://gitea.chocomarsh.com/self/queues-go/pulls/25
This commit is contained in:
emmatveev 2025-06-15 00:57:32 +03:00
commit 15563aa75d

View File

@ -15,9 +15,10 @@ import (
)
func writeMetric(timestamp time.Time, endpoint string, statusCode int, responseTime int, method string) {
loc, _ := time.LoadLocation("Europe/Moscow")
s := fmt.Sprintf(
`{"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"),
endpoint,
strconv.Itoa(statusCode),