
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@dynatrace/serverless-oneagent
Advanced tools
dynatrace-oneagent is a plugin for serverless framework which will add Dynatrace monitoring automatically to serverless deployments.
This plugin is community contributed and not officially supported by Dynatrace. In case of problems, feature requests, or questions submit a ticket on GitHub
The Dynatrace OneAgent serverless plugin will configure serverless and serverless-webpack to bundle Dynatrace npm module for PaaS.
In regular serverless projects, the plugin will npm install and tailor Dynatrace npm module for PaaS during serverless packaging process. It will also reconfigure the function handler definition to load Dynatrace OneAgent at function instance startup.
In serverless-webpack case, the plugin will configure webpack to include Dynatrace npm module for PaaS into the bundle. The resulting deployment zip file will contain the Javascript file for the handler function and a node_modules folder with Dynatrace OneAgent.
Enabling your serverless project for Dynatrace OneAgent is a two steps process:
serverless.ymlserverless.ymlExtend the plugins list of the projects serverless.yml file with @dynatrace/serverless-oneagent plugin.
service: dynatrace-oneagent-sample
plugins:
- '@dynatrace/serverless-oneagent'
provider:
name: aws
runtime: nodejs10.x
functions:
hello:
handler: index.hello
events:
- http:
method: GET
path: hello
OneAgent options can be specified in serverless.yml file or serverless (sls) command line.
The option string can be obtained from serverless configuration screen (Deploy Dynatrace > Setup Serverless integration).
Add following to serverless.yml:
custom:
serverless-oneagent:
options: '{"server":"...","tenant":"...", "tenanttoken":"..."}'
If you do not want to add OneAgent options to the serverless.yml , the options can be specified as a command line argument to serverless (sls) command.
serverless deploy --dt-oneagent-options='{"dynatraceTagPropertyPath":"headers.x-dynatrace","server":"...","tenant":"...","tenanttoken":"..."}'
serverless.yml | command line | description |
|---|---|---|
| options | --dt-oneagent-options=<option string> | Specifies OneAgent options |
| npmModuleVersion | --dt-oneagent-module-version=<version> | Specifies the version of OneAgent for PaaS module. Default is latest, specify next for @next version. |
| verbose | --verbose | enables extended output of plugin processing. --verbose enables verbose mode for all plugins, while verbose option in serverless.yml enables verbose output for this plugin only. |
| exclude | --dt-exclude | exclude given list of functions from instrumentation. Separate function names with comma on command line. |
| skipUninstall | --dt-skip-uninstall | de-installation of @dynatrace/oneagent module after packaging might interfere with alternative dependency management tools like lerna. This option suppresses the de-installation of @dynatrace/oneagent npm module. |
...
functions:
lambdaTest1:
handler: test/first.handler
lambdaTest2:
handler: test/second.handler
...
custom:
serverless-oneagent:
# enable serverless-oneagent plugin verbose mode
verbose: true
# specify @next Dynatrace OneAgent npm module
npmModuleVersion: next
exclude:
- lambdaTest2
serverless deploy --dt-oneagent-module-version=next --dt-oneagent-options='{"dynatraceTagPropertyPath":"headers.x-dynatrace","server":"...","tenant":"...","tenanttoken":"..."}' --verbose --dt-exclude=lambdaTest2
Serverless plugin installs automatically @dynatrace/oneagent dependency at build time which causes a Yarn build error. To work around that build error, manually add @dynatrace/oneagent in the package.json file
e.g.
"dependencies": {
"@dynatrace/oneagent": "latest"
},
"devDependencies": {
"@dynatrace/serverless-oneagent": "xxx"
}
The samples folder contains ready to go serverless projects.
In case of problems, feature requests, or questions submit a ticket.
Version 1.0.15
dt-skip-uninstall option addedFAQs
Dynatrace OneAgent serverless framework plugin
We found that @dynatrace/serverless-oneagent demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.