Below, we shall see the Cloud Function Node.js Serverless Auto-Instrumentation Monitoring steps in Atatus using OTel.

Instrument your serverless cloud functions with OpenTelemetry Node.js

  1. If you need to add API Key to otelwrapper.js file, navigate to Atatus Dashboard —> Settings —> Account Settings —> API Keys. You can either generate a new API key or copy an existing one with write permission. After obtaining the API key, you’ll need to set it in the otelwrapper.js.
  2. Create otelwrapper.js file. Then add the below code:
  3. Add package dependencies Add the following dependencies to your package.json
  4. Add the below environment into your serverless.yml.
  5. Finally, Deploy your GCP cloud function.