Skip to content

Statsd integration #89

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

Merged
merged 6 commits into from
Oct 8, 2020
Merged

Conversation

DarcyRaynerDD
Copy link
Contributor

What does this PR do?

Supports the extension via statsd

@DarcyRaynerDD DarcyRaynerDD requested a review from a team as a code owner October 8, 2020 17:26

class StatsDWrapper:
"""
Wraps StatsD calls, to give an identical to ThreadStats
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to give an identical what?

self.addCleanup(patcher.stop)
# patcher = patch("datadog_lambda.metric.lambda_metric")
# self.mock_lambda_metric = patcher.start()
# self.addCleanup(patcher.stop)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were patching the datadog_lambda.metric.lambda_metric out for testing, but the new code uses it internally, so I unpatched it. I'll remove this snippet.

return True


use_extension = is_extension_running()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me, use_extension sounds like a verb, i.e. if I call it, then the extension will be used. But it seems like it represents whether the extension should be used. Maybe rename this to is_using_extension or should_use_extension or something along those lines?

Copy link
Contributor

@nhinsch nhinsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, just a few nits

@DarcyRaynerDD DarcyRaynerDD merged commit a9f9d1f into master Oct 8, 2020
@DarcyRaynerDD DarcyRaynerDD deleted the darcy.rayner/statsd-integration branch October 8, 2020 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants