You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: setup/otel/languages/node.js/auto-instrumentation-of-lambdas.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,14 @@
1
+
---
2
+
description: SUSE Observability
3
+
---
4
+
1
5
# Auto-Instrumenting a NodeJS Lambda
2
6
3
-
# Introduction
7
+
##Introduction
4
8
5
9
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.
6
10
7
-
#**Prerequisites**
11
+
## Prerequisites
8
12
9
13
Before you begin, ensure you have the following:
10
14
@@ -14,7 +18,7 @@ Before you begin, ensure you have the following:
14
18
-**SUSE Observability:** An account with SUSE Observability where you'll send your telemetry data.
15
19
-**Memory:** Enough memory to run the Lambda’s including the instrumentation.
16
20
17
-
# Values supplied by the environment
21
+
##Values supplied by the environment
18
22
19
23
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:
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.
56
60
@@ -89,11 +93,11 @@ Be aware this collector is used to send the data over to a next collector which
89
93
90
94

91
95
92
-
# Package.json
96
+
## Package.json
93
97
94
98
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.
95
99
96
-
# Troubleshooting Timeouts
100
+
## Troubleshooting Timeouts
97
101
98
102
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):
99
103
@@ -137,7 +141,7 @@ Note the memory increment is 128MB
137
141
138
142
Note Timeout is an integer value denoting seconds.
0 commit comments