mozilla-services / buildhub

DEPRECATED: Mozilla Build Metadata Service
http://buildhub.readthedocs.io/en/latest/
Mozilla Public License 2.0
13 stars 10 forks source link

Integrate Datadog and our Lambda function #433

Closed peterbe closed 6 years ago

peterbe commented 6 years ago

According to the documentation it should be possible: https://docs.datadoghq.com/integrations/amazon_lambda/

When I go to https://app.datadoghq.com/account/settings#integrations/amazon_lambda I think what that page is trying to say is that it's enabled.

screen shot 2018-04-27 at 12 26 38 pm

This issue is two things:

  1. Enable to check that Datadog AWS Lambda integration is enable for the Buildhub context.
  2. Do these stdout writes (using our current metrics infra) so that the relevant metrics can be sucked up by the Datadog/Cloudwatch/Lambda integration.
peterbe commented 6 years ago

cc @bqbn

peterbe commented 6 years ago

pigeon does it with a simple print

peterbe commented 6 years ago

Even better, markus already has a backend for this! https://github.com/willkg/markus/blob/master/markus/backends/cloudwatch.py

peterbe commented 6 years ago

That PR does everything we can do (hopefully!) to enabled Datadog integration in Lambda. We just need to remember to set LOG_METRICS=cloudwatch in our Lambda environment.

peterbe commented 6 years ago

@bqbn This is what you did to make this work in Stage Lambda.

At the moment, Lambda on Prod is so old that it doesn't even use the markus metrics library.

I don't know what you need to do in cloudops-deployment so that it's enabled for Prod too so that we can close this issue.

bqbn commented 6 years ago

I'm closing this because, correct me if wrong, we now have the lambda metrics in Datadog for -stage, which means once the latest version (v1.3.2 as of this comment) is released to -prod, we should be able to see the same metrics in Datadog for -prod as well.

We can re-open this issue if, when the latest version is released, and we still don't have lambda metrics in Datadog for -prod.