Disable serverless enterprise wrapper

Although serverless wrapper is fine for development work, I don’t want it injected in my lambda production code. Is it possible to entirely opt out of this wrapper?

I found settings for:

  enterprise:
    disableAwsSpans: true
    collectLambdaLogs: false
    disableHttpSpans: true

But the plugin is still injected. Is it possible to entirely disable? (ideally when stage == prod)

1 Like

OK so what I’ve discovered.

To totally disable, enable enterpriseDisabled in ~/.serverlessrc. Undocumented, but checked here.

To disable the various trackers, I hacked up the following yml

custom:
  prod:
    disableReporting: true
    enableReporting: false

  enterprise:
    collectLambdaLogs: ${self:custom.${self:provider.stage}.enableReporting, true}
    disableAwsSpans: ${self:custom.${self:provider.stage}.disableReporting, false}
    disableHttpSpans: ${self:custom.${self:provider.stage}.disableReporting, false}
1 Like