Skip to content

Commit b793580

Browse files
committed
STAC-22297 Minor quality updates.
1 parent fd5b29f commit b793580

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

setup/otel/languages/node.js/auto-instrumentation-of-lambdas.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
---
2+
description: SUSE Observability
3+
---
4+
15
# Auto-Instrumenting a NodeJS Lambda
26

3-
# Introduction
7+
## Introduction
48

59
This document guides you through auto-instrumenting NodeJS Lambda functions using OpenTelemetry. Auto-instrumentation simplifies the process of adding observability to your Lambda functions by automatically capturing performance metrics and tracing information.
610

7-
# **Prerequisites**
11+
## Prerequisites
812

913
Before you begin, ensure you have the following:
1014

@@ -14,7 +18,7 @@ Before you begin, ensure you have the following:
1418
- **SUSE Observability:** An account with SUSE Observability where you'll send your telemetry data.
1519
- **Memory:** Enough memory to run the Lambda’s including the instrumentation.
1620

17-
# Values supplied by the environment
21+
## Values supplied by the environment
1822

1923
OpenTelemetry relies on various configuration values to function correctly. These values control aspects like data collection, exporting, and communication with backend systems. To make your OpenTelemetry deployment flexible and adaptable to different environments, you can provide these settings through environment variables. This approach offers several benefits:
2024

@@ -50,7 +54,7 @@ OTLP_INSTR_LAYER_ARN: "arn:aws:lambda:<aws-region>:184161586896:layer:openteleme
5054
OTLP_COLLECTOR_LAYER_ARN: "arn:aws:lambda:<aws-region>:184161586896:layer:opentelemetry-collector-<amd64|arm64>-0_12_0:1"
5155
```
5256
53-
# The collector.yaml file
57+
## The collector.yaml file
5458
5559
OTEL collection configuration sets up how the data collected should be distributed. This is done in the collector.yaml file placed in the src directory where the lambda files can be found. Below is an example collector.yaml file.
5660
@@ -89,11 +93,11 @@ Be aware this collector is used to send the data over to a next collector which
8993
9094
![AWS Lambda Instrumentation With Opentelemetry](/.gitbook/assets/otel/aws_nodejs_otel_auto_instrumentation.svg)
9195
92-
# Package.json
96+
## Package.json
9397
9498
Make sure to add `"@opentelemetry/auto-instrumentations-node": "^0.55.2",` to `package.json` and execute `npm install` to add the auto-instrumentation client libraries to your NodeJS Lambda.
9599

96-
# Troubleshooting Timeouts
100+
## Troubleshooting Timeouts
97101

98102
If the addition of the OTEL Lambda layers results in lambdas that time out (checking the logs might indicate that the collector was asked to shut down while still busy, e.g. seeing the following log entry):
99103

@@ -137,7 +141,7 @@ Note the memory increment is 128MB
137141

138142
Note Timeout is an integer value denoting seconds.
139143

140-
# References
144+
## References
141145

142146
Auto-instrumentation docs → [https://opentelemetry.io/docs/faas/lambda-auto-instrument/](https://opentelemetry.io/docs/faas/lambda-auto-instrument/)
143147

0 commit comments

Comments
 (0)