Skip to content

Commit

Permalink
APIGOV-29054 - fix for time conversion while parsing Monitoring acrchive
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekschauhan committed Oct 30, 2024
1 parent 62d823c commit 9f3f897
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/anypoint/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

const (
HealthCheckEndpoint = "mulesoft"
monitoringURITemplate = "%s/monitoring/archive/api/v1/organizations/%s/environments/%s/apis/%s/summary/%d/%02d/%02d"
monitoringURITemplate = "%s/monitoring/archive/api/v1/organizations/%s/environments/%s/apis/%s/summary/%4d/%02d/%02d"
metricSummaryURITemplate = "%s/monitoring/archive/api/v1/organizations/%s/environments/%s/apis/%s/summary/%d/%02d/%02d/%s"
queryTemplate = `SELECT sum("request_size.count") as request_count, max("response_time.max") as response_max, min("response_time.min") as response_min
FROM "rp_general"."api_summary_metric"
Expand Down Expand Up @@ -537,7 +537,7 @@ func (c *AnypointClient) parseMetricSummaries(metricDataStream []byte) ([]APIMon
}
break
}
metricTime := time.Unix(metricData.Time, 0)
metricTime := time.UnixMilli(metricData.Time)
metric := APIMonitoringMetric{
Time: metricTime,
Events: metricData.Events,
Expand Down

0 comments on commit 9f3f897

Please sign in to comment.