Address review feedback
This commit is contained in:
Родитель
f5afe41ff4
Коммит
5322ba5212
|
@ -47,9 +47,6 @@ It will then be viewable publically.
|
|||
|
||||
To enable all release metrics (except those in `METRICS_BLACKLIST`), set the envvar `ALLOW_ALL_RELEASE_METRICS` to "True".
|
||||
|
||||
### Pre-Release Metrics
|
||||
To disable a metric for prerelease only (in effect, allowing it for viewing internally only), add it to `PRERELEASE_METRICS_BLACKLIST`.
|
||||
|
||||
## API
|
||||
Aggregates are made available through a HTTP API. There are two kinds of aggregates: per submission date (date a ping is received by the server) and per build-id (date the submitting product was built).
|
||||
|
||||
|
|
|
@ -57,8 +57,8 @@ ALLOWED_DIMENSIONS = ('application', 'architecture', 'child', 'dates', 'label',
|
|||
'metric', 'os', 'osVersion', 'version')
|
||||
|
||||
# Disallowed metrics for serving
|
||||
METRICS_BLACKLIST = ["SEARCH_COUNTS"]
|
||||
PRERELEASE_METRICS_BLACKLIST = [
|
||||
METRICS_BLACKLIST = [
|
||||
"SEARCH_COUNTS",
|
||||
"SCALARS_TELEMETRY.EVENT_COUNTS",
|
||||
"SCALARS_TELEMETRY.DYNAMIC_EVENT_COUNTS"
|
||||
]
|
||||
|
@ -298,10 +298,7 @@ def _allow_metric(channel, metric):
|
|||
else:
|
||||
return False
|
||||
elif channel != RELEASE_CHANNEL:
|
||||
if metric in PRERELEASE_METRICS_BLACKLIST:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
return True
|
||||
|
||||
|
||||
@app.route('/aggregates_by/<prefix>/channels/<channel>/', methods=['GET'])
|
||||
|
@ -334,7 +331,7 @@ def get_dates_metrics(prefix, channel):
|
|||
abort(404, description="Missing date or version or metric. All three are required.")
|
||||
|
||||
if not _allow_metric(channel, metric):
|
||||
abort(404, description="This metric is not allowed.")
|
||||
abort(404, description="This metric is not allowed to be served.")
|
||||
|
||||
# Get bucket labels
|
||||
for _prefix, _labels in SCALAR_MEASURE_MAP.iteritems():
|
||||
|
|
Загрузка…
Ссылка в новой задаче