Skip to content
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

Unified service tagging for AWS Lambda #9374

Merged
merged 6 commits into from
Dec 28, 2020

Conversation

tianchu
Copy link
Contributor

@tianchu tianchu commented Dec 28, 2020

What does this PR do?

Document how to apply env, service and version tags to Lambda functions. Since "serverless" is a big world that has other players than just AWS Lambda functions (though Lambda dominates), I created a section for "Serverless" and put `AWS Lambda functions" under it as a subsection.

Also add a link to this doc from the serverless installation instructions.

Motivation

The serverless team consistently get this kind of questions from our customers, and a few of them referred to this doc and complained that there were no instructions for serverless (specifically for Lambda functions).

Preview

https://docs-staging.datadoghq.com/tian.chu/serverless-unified-service-tagging/getting_started/tagging/unified_service_tagging/

https://docs-staging.datadoghq.com/tian.chu/serverless-unified-service-tagging/serverless/installation/python
https://docs-staging.datadoghq.com/tian.chu/serverless-unified-service-tagging/serverless/installation/nodejs
https://docs-staging.datadoghq.com/tian.chu/serverless-unified-service-tagging/serverless/installation/ruby
https://docs-staging.datadoghq.com/tian.chu/serverless-unified-service-tagging/serverless/installation/go
https://docs-staging.datadoghq.com/tian.chu/serverless-unified-service-tagging/serverless/installation/java
https://docs-staging.datadoghq.com/tian.chu/serverless-unified-service-tagging/serverless/installation/dotnet

Additional Notes


Reviewer checklist

  • Review the changed files.
  • Review the URLs listed in the Preview section.
  • Review any mentions of "Contact Datadog support" for internal support documentation.

@tianchu tianchu requested a review from a team as a code owner December 28, 2020 21:21
@github-actions github-actions bot added the getting_started Content changed in the getting started folder label Dec 28, 2020
@tianchu tianchu added WORK IN PROGRESS No review needed, it's a wip ;) and removed getting_started Content changed in the getting started folder labels Dec 28, 2020
@github-actions github-actions bot added the getting_started Content changed in the getting started folder label Dec 28, 2020
@tianchu tianchu changed the title [WIP] Unified service tagging for AWS Lambda Unified service tagging for AWS Lambda Dec 28, 2020
@tianchu tianchu removed the WORK IN PROGRESS No review needed, it's a wip ;) label Dec 28, 2020
content/en/serverless/installation/dotnet.md Outdated Show resolved Hide resolved
content/en/serverless/installation/go.md Outdated Show resolved Hide resolved
content/en/serverless/installation/java.md Outdated Show resolved Hide resolved
content/en/serverless/installation/nodejs.md Outdated Show resolved Hide resolved
content/en/serverless/installation/python.md Outdated Show resolved Hide resolved
content/en/serverless/installation/ruby.md Outdated Show resolved Hide resolved
Co-authored-by: Kaylyn <kaylyn.sigler@datadoghq.com>
@apigirl apigirl merged commit aa2ec69 into master Dec 28, 2020
@apigirl apigirl deleted the tian.chu/serverless-unified-service-tagging branch December 28, 2020 22:53
@@ -198,15 +198,15 @@ For example:
datadog-ci lambda instrument -f my-function -f another-function -r us-east-1 -v 26 --forwarder arn:aws:lambda:us-east-1:000000000000:function:datadog-forwarder
```

If your Lambda function is configured to use code signing, you must add Datadog's Signing Profile ARN (`arn:aws:signer:us-east-1:464622532012:/signing-profiles/DatadogLambdaSigningProfile/9vMI9ZAGLc`) to your function's [Code Signing Configuration][5] before you can instrument it with the Datadog CLI.
If your Lambda function is configured to use code signing, you must add Datadog's Signing Profile ARN (`arn:aws:signer:us-east-1:464622532012:/signing-profiles/DatadogLambdaSigningProfile/9vMI9ZAGLc`) to your function's [Code Signing Configuration][4] before you can instrument it with the Datadog CLI.
Copy link
Contributor

Choose a reason for hiding this comment

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

Side note - can we remove this from the main installation steps into a separate file? I think since this doesn't apply to most customers this will come off as confusing ("This seems complicated, I don't know if I should set this up") and makes our happy path installation instructions longer.

Copy link
Contributor

Choose a reason for hiding this comment

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

We should remove this for all runtimes, a potential solution is to add a new Code Signing page under the "Serverless Integrations" section.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps we can shorten the paragraph and link it to a separate page, but I don't think we should remove this paragraph completely here, because for customers having code signing enforcement enabled this is a must-do step. Of course, it's a relatively new feature so it's less important right now, but I don't know if it's going to be adopted more widely in the future. Either way, I think this should be a separate PR, and probably we should also consult @nhinsch's opinion?

Copy link
Contributor

Choose a reason for hiding this comment

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

My understanding from takes from serverless devs online is this something more niche that people in enterprises know to look for to check an audit/compliance checkbox (as opposed to something they aren't sure whether or not they need), so I think there's more benefit to putting this in a separate page so our instructions are more straightforward.

Transform:
- AWS::Serverless-2016-10-31
- Name: DatadogServerless
Parameters:
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we adding functionality to support adding tags on all functions in your template.yml? Without additional context, this looks like a typo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant specifically for the version tag since that's not listed in the example here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I think we need to update the macro to support the version tag first, and then come back to update this doc, since the version tag is not yet supported by the macro?

@@ -36,11 +36,15 @@ You need to subscribe the Datadog Forwarder Lambda function to each of your func
1. [Install the Datadog Forwarder if you haven't][2].
2. [Subscribe the Datadog Forwarder to your function's log groups][5].

### Unified Service Tagging
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need a section heading here? If it's just one section, we can leave this as a note or bold it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's only a subsection under the Configuration section, but I can go either way.

@Hesperide
Copy link
Contributor

I think this is also missing changes to https://docs.datadoghq.com/serverless/serverless_tagging?tab=serverlessframework, which we should update to contain the info mentioned here (since it's a bit duplicated now).

@tianchu tianchu mentioned this pull request Dec 29, 2020
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
getting_started Content changed in the getting started folder serverless
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants