-
Notifications
You must be signed in to change notification settings - Fork 93
Add Datadog timers for Active Data requests #1620
Conversation
7218271
to
25131e5
Compare
else: | ||
logger.info('No datadog credentials') | ||
|
||
# Must be instanciated after initialize |
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.
Nit: instantiated
@@ -95,7 +109,7 @@ def base_query(filters=[], excludes=[]): | |||
] | |||
) | |||
|
|||
async with ActiveDataClient() as es: | |||
async with ActiveDataClient('list_tests') as es: |
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.
Nit: maybe there's a way to automatically use the function name here, so we don't have to manually specify the name?
if self.start_time is not None: | ||
query_time = time.time() - self.start_time | ||
stats.histogram('codecoverage.active_data.{}'.format(self.name), query_time) | ||
logger.info('ActiveData ES query {} took {}'.format(self.name, query_time)) |
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.
Is there a way to get the actualy query time (that is, the ES query time, without the network time).
@@ -21,6 +23,7 @@ | |||
''' | |||
|
|||
|
|||
@stats.timed('codecoverage.active_data.coverage_paths') |
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.
This should be redundant now that there's a timer in search
.
@@ -61,12 +64,13 @@ def search(self, name, body, timeout=10): | |||
def enabled(self): | |||
return self.client is not None | |||
|
|||
@stats.timed('codecoverage.active_data.get_latest_changeset') |
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.
This should be redundant now that there's a timer in search
.
Fixes #1471