-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DB metrics: Cassandra #587
Conversation
Best reviewed: commit by commit
Optimal code review plan (3 warnings)
|
[CHATOPS:HELP] ChatOps commands.
|
Codecov Report
@@ Coverage Diff @@
## master #587 +/- ##
==========================================
+ Coverage 7.84% 11.77% +3.92%
==========================================
Files 388 409 +21
Lines 19945 21302 +1357
==========================================
+ Hits 1565 2508 +943
- Misses 18156 18514 +358
- Partials 224 280 +56
Continue to review full report at Codecov.
|
|
||
func (cm *cassandraMetrics) View() []*metrics.View { | ||
return []*metrics.View{ | ||
&metrics.View{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
File is not gofmt
-ed with -s
(gofmt)
1255083
to
c003660
Compare
@@ -55,7 +56,7 @@ func New() metrics.Metric { | |||
heapReleased: *metrics.Int64(metrics.ValdOrg+"/memory/heap_released", "bytes of physical memory returned to the OS", metrics.UnitBytes), | |||
stackInuse: *metrics.Int64(metrics.ValdOrg+"/memory/stack_inuse", "bytes in stack spans", metrics.UnitBytes), | |||
stackSys: *metrics.Int64(metrics.ValdOrg+"/memory/stack_sys", "bytes of stack memory obtained from the OS", metrics.UnitBytes), | |||
pauseTotalMs: *metrics.Float64(metrics.ValdOrg+"/memory/pause_ms_total", "the cumulative milliseconds in GC", metrics.UnitMilliseconds), | |||
pauseTotalMs: *metrics.Int64(metrics.ValdOrg+"/memory/pause_ms_total", "the cumulative milliseconds in GC", metrics.UnitMilliseconds), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
line is 136 characters (lll)
@@ -40,6 +40,8 @@ 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
line is 237 characters (lll)
|
||
func New() Observer { | ||
return &cassandraMetrics{ | ||
queryTotal: *metrics.Int64(metrics.ValdOrg+"/db/nosql/cassandra/completed_query_total", "cumulative count of completed queries", metrics.UnitDimensionless), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
line is 160 characters (lll)
func New() Observer { | ||
return &cassandraMetrics{ | ||
queryTotal: *metrics.Int64(metrics.ValdOrg+"/db/nosql/cassandra/completed_query_total", "cumulative count of completed queries", metrics.UnitDimensionless), | ||
queryLatency: *metrics.Float64(metrics.ValdOrg+"/db/nosql/cassandra/query_latency", "query latency", metrics.UnitMilliseconds), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
line is 129 characters (lll)
ms []metrics.MeasurementWithTags | ||
} | ||
|
||
type Observer interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
exported type Observer
should have comment or be unexported (golint)
cassandra.QueryObserver | ||
} | ||
|
||
func New() (o Observer, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
exported function New
should have comment or be unexported (golint)
cm.ms = append( | ||
cm.ms, | ||
metrics.MeasurementWithTags{ | ||
Measurement: cm.queryTotal.M(1), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
mnd: Magic number: 1, in detected (gomnd)
"github.com/gocql/gocql" | ||
) | ||
|
||
type QueryObserver = gocql.QueryObserver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
exported type QueryObserver
should have comment or be unexported (golint)
) | ||
|
||
type QueryObserver = gocql.QueryObserver | ||
type ObservedQuery = gocql.ObservedQuery |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
exported type ObservedQuery
should have comment or be unexported (golint)
type QueryObserver = gocql.QueryObserver | ||
type ObservedQuery = gocql.ObservedQuery | ||
|
||
type BatchObserver = gocql.BatchObserver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
exported type BatchObserver
should have comment or be unexported (golint)
|
||
type BatchObserver = gocql.BatchObserver | ||
|
||
type ConnectObserver = gocql.ConnectObserver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
exported type ConnectObserver
should have comment or be unexported (golint)
|
||
type ConnectObserver = gocql.ConnectObserver | ||
|
||
type FrameHeaderObserver = gocql.FrameHeaderObserver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
exported type FrameHeaderObserver
should have comment or be unexported (golint)
438ed70
to
39d4911
Compare
/rebase |
[REBASE] Rebase triggered by rinx for branch: feature/meta-cassandra/add-query-metrics |
4776087
to
07434c0
Compare
[FORMAT] Updating license headers and formatting go codes triggered by rinx. |
@@ -40,6 +40,8 @@ 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
DefaultMillisecondsDistribution
is a global variable (gochecknoglobals)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/rebase |
[REBASE] Rebase triggered by rinx for branch: feature/meta-cassandra/add-query-metrics |
07434c0
to
2513c9c
Compare
/rebase |
[REBASE] Rebase triggered by kpango for branch: feature/meta-cassandra/add-query-metrics |
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
2513c9c
to
b95d636
Compare
[FORMAT] Updating license headers and formatting go codes triggered by kpango. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[APPROVED] This PR is approved by kpango.
Signed-off-by: Rintaro Okamura rintaro.okamura@gmail.com
Description:
Add Cassandra metrics to these components
added metrics
Related Issue:
#343
How Has This Been Tested?:
nothing
Environment:
Types of changes:
Changes to Core Features:
Checklist: