.agents/skills/serverless-integrations/SKILL.md
Use this skill for platform-boundary instrumentation where dd-trace-js owns the function invocation lifecycle.
Use apm-integrations instead for ordinary library instrumentation that runs inside a serverless function.
Classify the request before touching code:
| Request shape | Skill path | Span model |
|---|---|---|
| Trace a third-party library call inside Lambda/Azure/GCP | apm-integrations | Child spans under the invocation |
| Trace the cloud function invocation itself | This skill | Root type = 'serverless' span |
| Trace an HTTP, queue, or event trigger | This skill plus trigger references | Root span plus context or links |
| Change AWS Lambda bootstrap or timeout behavior | This skill | Special-case runtime wrapper path |
Do not model ordinary library plugins after the Lambda bootstrap. Lambda is a compatibility/runtime wrapper path, not the default architecture for new integrations.
static kind = 'server' and static type = 'serverless'.TracingPlugin unless a more specific local pattern clearly applies. Do not default to ServerPlugin just
because the span kind is server.references/architecture.md to confirm whether the work is serverless-root or ordinary APM.references/reference-integrations.md and inspect at least one matching in-repo implementation.references/implementation-guide.md.references/testing-guide.md.packages/datadog-instrumentations/ when the runtime can be observed through
normal hooks.packages/datadog-plugin-<name>/ when spans are created from diagnostic-channel
events.packages/dd-trace/src/plugins/index.js.packages/dd-trace/src/service-naming/schemas/*/serverless.js.web.patch, web.startServerlessSpanWithInferredProxy,
and web.finishAll when they match the trigger model.