• Documentation
  • Pricing
© 2026 Serverless, Inc. All rights reserved.

Framework

  • Overview
  • Documentation
  • Plugins360
  • Pricing

Learn

  • Blog
  • GuidesUpdated
  • Examples240
  • Courses

Resources

  • Support
  • Security
  • Trust Center
  • Status

Community

  • Slack
  • GitHub47k
  • Forum
  • Meetups

Company

  • About
  • Careers
  • Contact
  • Partners

Legal

  • Terms of Service
  • Privacy Policy
  • Trademark
  • DMCA
Serverless Framework Logo

Serverless Framework

Intro
SetupUpgrading To V4ConceptsTutorialAWS CredentialsLicense KeysVerifying Downloads
DeployingPackagingBuildingTestingDev ModeServicesFunctions
OverviewHTTP (API Gateway v2)REST (API Gateway v1)ActiveMQApplication Load BalancerAlexa SkillAlexa Smart HomeCloudWatch EventCloudWatch LogCloudFrontCognito User PoolEventBridge EventIoTIoT Fleet ProvisioningKafkaKinesis & DynamoDBMSKRabbitMQS3ScheduleSNSSQSWebsocket
Layers
OverviewTroubleshooting
Managed InstancesWeb Apps (Lambda Web Functions)Sandboxes (Lambda MicroVMs)MCP ServersAlertsVersion PruningDomainsIAM Function PermissionsParameters
OverviewSelf-reference serverless.ymlServerless CoreEnvironment VariablesCLI OptionsExternal YAML/JSON FilesJavascript propertiesGitDoppler
OverviewS3 ObjectsSSM Parameter Store & Secrets ManagerCloudFormation Stack Outputs
OverviewVaultTerraform State Output
ResourcesComposing ServicesDeployment BucketStateAgent SkillsPython support
OverviewRuntimeGatewayMemoryBrowserCode InterpreterDev Mode
API Gateway Proxy
OverviewGeneral ConfigurationAuthenticationAPI KeysData SourcesResolversPipeline FunctionsSubstitutionsCachingDelta SyncCustom DomainWAFCLI Commands
Deploying SAM/CFN TemplatesWorkflow Tips
OverviewCreating PluginsCLI OutputCustom CommandsCustom VariablesExtending the Configuration schemaExtending and overriding configuration
OverviewDashboardAxiom
Overviewagent docsagent inspectagent setupagent skills installagent skills list / readdeploydeploy functiondeploy listdevdiffinfoinvokeinvoke localloginlogin awslogin aws ssologsmetricspackageplugin installplugin uninstallprintprunereconcileremoverollbackrollback functionusage
OverviewConcepts
OverviewMetricsTracesTroubleshoot
OverviewNode.jsPython
OutputsProviders
OverviewBranch DeploymentsPreview DeploymentsCustom ScriptsTestingPrivate PackagesNotificationsMono ReposDeploy in your own CI/CDBest PracticesTroubleshootingFAQ
OverviewSetupToolsAWS Integration
Serverless.yml Reference
Examples and TutorialsConfiguration Validation
  1. Dashboard
  2. Monitoring Observability
  3. SDK
  4. Overview

Dashboard observability SDKs

The Serverless Framework Dashboard SDKs run inside instrumented AWS Lambda functions: they create the traces, spans and events the Dashboard shows, and give your handler an API to capture handled errors and warnings, add tags, create custom spans and set the request endpoint. Instrumentation works without code changes; use the SDK API when you need more than the automatic data.

RuntimePackage to installImport
Node.js@serverless/sdk (@serverless/aws-lambda-sdk for bundled or ES module code that needs AWS SDK or Express instrumentation)import serverlessSdk from '@serverless/sdk'
Pythonserverless-sdkfrom sls_sdk import serverlessSdk
  • Node.js SDK
  • Python SDK

How the SDK gets into a function

When a function is instrumented, the Dashboard adds a Lambda Layer with the SDK and sets two environment variables on the function: AWS_LAMBDA_EXEC_WRAPPER, which makes the Layer's wrapper start your handler, and SLS_ORG_ID. The Serverless Framework doesn't add the SDK to your deployment package. Instrument functions with stages.<stage>.observability in serverless.yml or in the Dashboard; see Dashboard monitoring and observability.

Install the SDK package in your service as well when your handler calls the SDK API, so the import resolves even while the Layer is missing, for example right after a deploy and before the Dashboard instruments the function again. Without the Layer, the SDK sends nothing to the Dashboard. The Node.js SDK's API calls don't throw there. In the Python SDK, create_span can raise UnreachableTrace after the first custom span has closed; see Install and import the Python SDK.

SDK environment variables

The SDKs read these environment variables at startup. Set them for all functions under provider.environment, or for one function under its environment. Any non-empty value, including false, turns a setting on:

VariableRuntimeEffect
SLS_DISABLE_HTTP_MONITORINGNode.js, PythonNo spans for outgoing HTTP and HTTPS requests.
SLS_DISABLE_AWS_SDK_MONITORINGNode.js, PythonNo spans for AWS SDK requests.
SLS_DISABLE_EXPRESS_MONITORINGNode.jsNo Express instrumentation.
SLS_DISABLE_FLASK_MONITORINGPythonNo Flask instrumentation.
SLS_DISABLE_NODE_CONSOLE_MONITORINGNode.jsconsole.error, console.warn and JSON log lines aren't captured as errors and warnings.
SLS_DISABLE_PYTHON_LOG_MONITORINGPythonlogging errors and warnings aren't captured.
SLS_DISABLE_CAPTURED_EVENTS_STDOUTNode.js, PythonErrors and warnings captured with the SDK API aren't printed to the logs.
SLS_DISABLE_TRACE_SAMPLINGPythonEvery trace is sent in full. See How trace sampling works.
SLS_SDK_DEBUGNode.js, PythonPrints SDK debug lines starting with ⚡ SDK: and sends every trace in full.

For example, to turn off HTTP spans for every function of a service:

provider:
  environment:
    SLS_DISABLE_HTTP_MONITORING: true

SDK source and changelogs

The SDKs are open source; their source, API references and changelogs are in the Serverless Framework Dashboard repository.

Related pages

  • Node.js SDK
  • Python SDK
  • Dashboard traces
Edit this page
Prev TroubleshootNextNode.js

Contents

  • Dashboard observability SDKs
  • How the SDK gets into a function
  • SDK environment variables
  • SDK source and changelogs
  • Related pages

Related

GuidesPluginsExamplesSlack CommunitySupport