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:
commit
15563aa75d
3
main.go
3
main.go
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user