DataDog / datadog-lambda-js

The Datadog AWS Lambda Library for Node
Apache License 2.0
113 stars 35 forks source link

Show NestJS API endpoints as Resources in the Service Page for an AWS Lambda service #574

Open bhrutledge opened 2 months ago

bhrutledge commented 2 months ago

Expected Behavior

NestJS endpoints (e.g. GET /users/{id}, POST /users/} appear as Resources in the Service Catalog page

Actual Behavior

On the Service Catalog page, the only Resource that's listed is the Lambda. However, for FastAPI Python applications deployed in a similar manner, the Service Catalog page shows all of the API endpoints as Resources. I noticed that for the FastAPI applications, the "primary operation" is fastapi.request. For the NestJS applications, it's aws.lambda, with no additional option for anything related to NestJS.

I read about "Complex framework usage" in Node.js Compatibility Requirements, but it looks like initializing dd-trace is already done in datadog-lambda-js/src/runtime/module_importer.js

Steps to Reproduce the Problem

My NestJS application is deployed as a Lambda via the AWS CDK. I'm using the Datadog construct from datadog-cdk-constructs. I'm getting traces, logs, and metrics in Datadog.

Specifications