Skip to content

Commit

Permalink
fix: runtime outputs memory address on startup for metrics spec (dapr…
Browse files Browse the repository at this point in the history
…#8169)

Signed-off-by: Ruihua Wen <[email protected]>
  • Loading branch information
SpiffyEight77 authored Oct 7, 2024
1 parent efe9ac9 commit 94fe7b9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/config/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,11 @@ func (m MetricSpec) GetHTTPIncreasedCardinality(log logger.Logger) bool {
// GetLatencyDistribution returns a *view.Aggregration to be used for latency histograms
func (m MetricSpec) GetLatencyDistribution(log logger.Logger) *view.Aggregation {
defaultLatencyDistribution := []float64{1, 2, 3, 4, 5, 6, 8, 10, 13, 16, 20, 25, 30, 40, 50, 65, 80, 100, 130, 160, 200, 250, 300, 400, 500, 650, 800, 1_000, 2_000, 5_000, 10_000, 20_000, 50_000, 100_000}
log.Infof("metric spec: %v", m)
metricSpecBytes, err := json.Marshal(m)
if err != nil {
log.Errorf("Error marshalling metric spec to JSON: %s", err)
}
log.Infof("metric spec: %s", string(metricSpecBytes))
if m.LatencyDistributionBuckets == nil || len(*m.LatencyDistributionBuckets) == 0 {
// The default is defaultLatencyDistribution
log.Infof("Using default latency distribution buckets: %v", defaultLatencyDistribution)
Expand Down

0 comments on commit 94fe7b9

Please sign in to comment.