-
Notifications
You must be signed in to change notification settings - Fork 97
Add Measure, TagKey and View constants for recording HTTP stats #360
Add Measure, TagKey and View constants for recording HTTP stats #360
Conversation
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 except minor nits.
/cc @rghetia
}; | ||
|
||
const SIZE_DISTRIBUTION: number[] = [ | ||
0, 1024, 2048, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216, |
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.
Not sure if we still want to include the leading 0s?
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 would keep it now, until we officially remove this from the specs.
Context (for the record) -> we are already dropping negative and zero bucket bounds in top level API, so it doesn't make sense to include 0 at first place. Also specs says "The values must be strictly increasing and > 0".
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.
Lets remove it. We can open another PR to update the specs. For now we have two conflicting specs (one for metrics proto and one for http/grpc stats). Since we don't have any useful data in zero bucket might as well remove it.
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.
Ok, done.
|
||
/** Register all default client views. */ | ||
export function registerAllClientViews(globalStats: Stats) { | ||
for (const CLIENT_VIEW of HTTP_BASIC_CLIENT_VIEWS) { |
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.
Optional nit: should we use ALL_CAPS
for const
declarations that are local to a function (here and for registerAllServerViews
below)?
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.
Done
}; | ||
|
||
const SIZE_DISTRIBUTION: number[] = [ | ||
0, 1024, 2048, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216, |
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.
Lets remove it. We can open another PR to update the specs. For now we have two conflicting specs (one for metrics proto and one for http/grpc stats). Since we don't have any useful data in zero bucket might as well remove it.
5b32c3e
to
61dbfb6
Compare
Codecov Report
@@ Coverage Diff @@
## master #360 +/- ##
======================================
Coverage 95.3% 95.3%
======================================
Files 124 124
Lines 8413 8413
Branches 624 624
======================================
Hits 8018 8018
Misses 395 395 Continue to review full report at Codecov.
|
Specs: https://github.com/census-instrumentation/opencensus-specs/blob/master/stats/HTTP.md
This is part of #269