-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Instrument MetricsReader with metrics #3667
Instrument MetricsReader with metrics #3667
Conversation
Signed-off-by: Albert Teoh <[email protected]>
Signed-off-by: Albert Teoh <[email protected]>
Signed-off-by: Albert Teoh <[email protected]>
Signed-off-by: Albert Teoh <[email protected]>
Signed-off-by: Albert Teoh <[email protected]>
Signed-off-by: Albert Teoh <[email protected]>
Signed-off-by: Albert Teoh <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #3667 +/- ##
==========================================
- Coverage 96.52% 96.49% -0.03%
==========================================
Files 265 266 +1
Lines 15581 15622 +41
==========================================
+ Hits 15040 15075 +35
- Misses 453 457 +4
- Partials 88 90 +2
Continue to review full report at Codecov.
|
cmd/all-in-one/main.go
Outdated
if err := factory.Initialize(logger); err != nil { | ||
func createMetricsQueryService( | ||
metricsReaderFactory *metricsPlugin.Factory, | ||
metricsReaderMetricsFactory metrics.Factory, |
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.
Group logger and metrics next to each other
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.
Addressed in a41b9be.
type queryMetrics struct { | ||
Errors metrics.Counter `metric:"requests" tags:"result=err"` | ||
Successes metrics.Counter `metric:"requests" tags:"result=ok"` | ||
Responses metrics.Timer `metric:"responses"` // used as a histogram, not necessary for GetTrace |
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.
Copied comment?
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.
Removed in 857f64a.
} else { | ||
q.Successes.Inc(1) | ||
q.OKLatency.Record(latency) | ||
q.Responses.Record(time.Duration(responses)) |
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.
I don't follow, what is 1ns here?
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.
Signed-off-by: Albert Teoh <[email protected]>
Signed-off-by: Albert Teoh <[email protected]>
Signed-off-by: Albert Teoh <[email protected]>
* Add metrics instrumentation for SPM (MetricsReader) Signed-off-by: Albert Teoh <[email protected]> * Add metrics for all-in-one and new prometheus reader Signed-off-by: Albert Teoh <[email protected]> * Remove new prometheus metrics instrumentation Signed-off-by: Albert Teoh <[email protected]> * Add license Signed-off-by: Albert Teoh <[email protected]> * Revert unused metrics for prometheus factory Signed-off-by: Albert Teoh <[email protected]> * Long params to multiline and inline return Signed-off-by: Albert Teoh <[email protected]> * make fmt Signed-off-by: Albert Teoh <[email protected]> * Group logger and metrics next to each other Signed-off-by: Albert Teoh <[email protected]> * Remove copied comment Signed-off-by: Albert Teoh <[email protected]> * Remove responses metric Signed-off-by: Albert Teoh <[email protected]>
Which problem is this PR solving?
Short description of the changes
Testing
jaeger-query
Success
With Prometheus server running.
requests
latency_buckets
Fail
Prometheus server NOT running.
requests
all-in-one
Success
With Prometheus server running.
requests
latency_buckets
Fail
Prometheus server NOT running.
requests