Skip to content

Commit

Permalink
🔧 add RoughMillisecondsDistribution
Browse files Browse the repository at this point in the history
Signed-off-by: Rintaro Okamura <[email protected]>
  • Loading branch information
rinx authored and actions-user committed Sep 1, 2020
1 parent 7eb5f8f commit 6bfcf6b
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/observability/metrics/agent/sidecar/sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (sm *sidecarMetrics) View() []*metrics.View {
Description: sm.uploadLatency.Description(),
TagKeys: uploadKeys,
Measure: &sm.uploadLatency,
Aggregation: metrics.DefaultMillisecondsDistribution,
Aggregation: metrics.RoughMillisecondsDistribution,
},
}
}
Expand Down
85 changes: 84 additions & 1 deletion internal/observability/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,90 @@ var (
LastValue = view.LastValue
Sum = view.Sum

DefaultMillisecondsDistribution = Distribution(0.01, 0.05, 0.1, 0.3, 0.6, 0.8, 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, 1000, 2000, 5000, 10000, 20000, 50000, 100000)
DefaultMillisecondsDistribution = Distribution(
0.01,
0.05,
0.1,
0.3,
0.6,
0.8,
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,
1000,
2000,
5000,
10000,
20000,
50000,
100000,
)
RoughMillisecondsDistribution = Distribution(
1,
5,
10,
30,
60,
8,
100,
200,
300,
400,
500,
600,
800,
1000,
1300,
1600,
2000,
2500,
3000,
4000,
5000,
6500,
8000,
10000,
13000,
16000,
20000,
25000,
30000,
40000,
50000,
65000,
80000,
100000,
200000,
500000,
1000000,
2000000,
5000000,
10000000,
)

NewKey = tag.NewKey

Expand Down

0 comments on commit 6bfcf6b

Please sign in to comment.