Skip to content

Commit

Permalink
addressing more comments
Browse files Browse the repository at this point in the history
Signed-off-by: rahulkaukuntla <rahul.kaukuntla@datadoghq.com>
  • Loading branch information
rahulkaukuntla committed Apr 29, 2024
1 parent 6285813 commit 5a22ccb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@ def _report_images(self, config, tags):
tags=GLANCE_IMAGE_TAGS,
prefix=GLANCE_IMAGE_PREFIX,
metrics=GLANCE_IMAGE_METRICS,
lambda_name=lambda key: 'up' if key == 'status' else 'size' if key == 'name' else key,
lambda_name=lambda key: 'up' if key == 'status' else key,
lambda_value=lambda key, value, item=item: (
item['status'] == 'active' if key == 'status' else
item['size'] if key == 'name' else value
item['status'] == 'active' if key == 'status' else value
),
)
self.check.log.debug("image: %s", image)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,10 @@
GLANCE_RESPONSE_TIME = f"{GLANCE_METRICS_PREFIX}.response_time"
GLANCE_IMAGE_PREFIX = f"{GLANCE_METRICS_PREFIX}.image"
GLANCE_IMAGE_COUNT = f"{GLANCE_IMAGE_PREFIX}.count"
GLANCE_IMAGE_METRICS = {f"{GLANCE_IMAGE_PREFIX}.up": {},
f"{GLANCE_IMAGE_PREFIX}.size": {}}
GLANCE_IMAGE_METRICS = {
f"{GLANCE_IMAGE_PREFIX}.up": {},
f"{GLANCE_IMAGE_PREFIX}.size": {},
}
GLANCE_IMAGE_TAGS = {
'id': 'image_id',
'name': 'image_name',
Expand Down

0 comments on commit 5a22ccb

Please sign in to comment.