Skip to content

added functionality for custom tags from DD_TAGS environment variable #38

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 1 commit into from
Sep 17, 2018

Conversation

aldegoeij
Copy link
Contributor

in order to pass tags like "prod", or "environment:prod" to all cloudwatch messages processed by the lambda, I've implemented similar functionality as for the DD docker container.
Using the DD_TAGS environment variable, which you can set in your CloudFormation or Terraform (like we do), as additional metadata["ddtags"].
Also minor whitespace on the '+'s.

@NBParis
Copy link

NBParis commented Apr 25, 2018

Hello @aldegoeij .

First of all, thanks a lot for your help on making Datadog a better product.
The idea to collect tags from an environment variable is indeed very interesting and we would be pleased to add it.

Would it however be possible to add a check in your PR to make sure we do not try to add it to the list of tags if the environment variable is empty?

Thanks a lot,
Nils

@dmulter
Copy link

dmulter commented Sep 13, 2018

I was about to submit a PR, and saw this was already submitted. Looks to me like it already handles the case where the env var DD_TAGS isn't set. Can we see this merged sometime soon?

@NBParis
Copy link

NBParis commented Sep 14, 2018

Hello @dmulter,

Indeed, sorry for forgetting about this one.
And it indeed handles it correctly in case it is not set (misread the code on my first review...)

We will do some tests and merge right after.

Copy link

@NBParis NBParis left a comment

Choose a reason for hiding this comment

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

Works perfectly.

@NBParis NBParis merged commit 1a31db3 into DataDog:master Sep 17, 2018
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