Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 1129730

Browse files
committed
apply review feedback
1 parent 1079b63 commit 1129730

File tree

1 file changed

+6
-32
lines changed

1 file changed

+6
-32
lines changed

docs/guides/deploying/aws-datadog-monitoring.mdx

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -47,28 +47,13 @@ npm install datadog-lambda-js dd-trace
4747

4848
## Add the Datadog Lambda extension
4949

50-
To enable Datadog monitoring, add the Datadog Lambda Extension to your container image by modifying your `node.dockerfile`. Add the following lines to the end of your dockerfile, just before you define your entrypoint `ENTRYPOINT ["node", "lib/index.js"]`.
50+
To enable Datadog monitoring, add the Datadog Lambda Extension to your container image by modifying your `node.dockerfile`. Add the following lines to the end of the final stage.
5151

52-
1. **Fetch and copy the Datadog Lambda Extension**
53-
Retrieve the Lambda Extension from Amazon's Elastic Container Registry (ECR) and copy its contents into the `/opt/` directory of your image. This extension runs as a sidecar process, collecting and forwarding telemetry data to Datadog.
52+
Retrieve the Lambda Extension from Amazon's Elastic Container Registry (ECR) and copy its contents into the `/opt/` directory of your image. This extension runs as a sidecar process, collecting and forwarding telemetry data to Datadog.
5453

55-
```dockerfile
56-
COPY --from=public.ecr.aws/datadog/lambda-extension:latest-alpine /opt/. /opt/
57-
```
58-
59-
2. **Remove the default Datadog handler file**
60-
The default `handler.js` file from `datadog-lambda-js` might contain unnecessary boilerplate functionality.
61-
62-
```dockerfile
63-
RUN rm node_modules/datadog-lambda-js/dist/handler.js
64-
```
65-
66-
3. **Define the container's entry point**
67-
Configure the Lambda runtime to use the specialized `handler.handler` file as the entry point:
68-
69-
```dockerfile
70-
CMD ["node_modules/datadog-lambda-js/dist/handler.handler"]
71-
```
54+
```dockerfile
55+
COPY --from=public.ecr.aws/datadog/lambda-extension:latest-alpine /opt/. /opt/
56+
```
7257

7358
### Final dockerfile
7459

@@ -122,17 +107,6 @@ COPY --from=build /usr/app/lib/ ./lib/
122107
COPY --from=public.ecr.aws/datadog/lambda-extension:latest-alpine /opt/. /opt/
123108
# !diff +
124109

125-
# !diff +
126-
# Remove default Datadog handler
127-
# !diff +
128-
RUN rm node_modules/datadog-lambda-js/dist/handler.js
129-
# !diff +
130-
131-
# !diff +
132-
# Define the entry point
133-
# !diff +
134-
CMD ["node_modules/datadog-lambda-js/dist/handler.handler"]
135-
136110
ENTRYPOINT ["node", "lib/index.js"]
137111
```
138112

@@ -180,7 +154,7 @@ nitric up
180154
```
181155

182156
<Note>
183-
Cloud deployments may incur costs. While many resources are available under
157+
Datadog services and Cloud deployments may incur costs. While many resources are available under
184158
free-tier pricing, consider the deployment costs carefully.
185159
</Note>
186160

0 commit comments

Comments
 (0)