Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this plugin superseded by the native Serverless Framework support? #22

Open
powelli opened this issue Dec 6, 2019 · 1 comment
Open

Comments

@powelli
Copy link

powelli commented Dec 6, 2019

In release v1.40 the Serverless Framework included support for lambda X-Ray tracing (https://serverless.com/blog/framework-release-v140/) and subsequently in v1.41 also incorporated API Gateway tracing support (https://serverless.com/blog/framework-release-v141/).

Do these SLS releases supersede this plugin, or are there any benefits/implementation advantages of using this plugin over the native features?

@mickdekkers
Copy link

I can confirm that this plugin is no longer necessary. We've just migrated our lambda functions away from this plugin and everything still works as before.

Migration guide

Turns out this is pretty simple. You just need to remove serverless-plugin-tracing from your dependencies and make a few changes to your serverless config.

Serverless config changes

  • From the plugins list remove serverless-plugin-tracing
 plugins:
-  - serverless-plugin-tracing
  • Replace provider.tracing: true with provider.tracing.lambda: true
 provider:
-  tracing: true
+  tracing:
+    lambda: true

Note: if you enabled or disabled tracing based on an environment variable, you will need to use strToBool to convert it to a boolean value now. e.g.:

 provider:
-  tracing: ${env:TRACING_ENABLED, 'false'}
+  tracing:
+    lambda: ${strToBool(${env:TRACING_ENABLED, 'false'})}
  • Remove X-Ray related iamRoleStatements. These are now automatically added by serverless when tracing is enabled
 provider:
   iamRoleStatements:
-    - Effect: "Allow" # xray permissions (required)
-      Action:
-        - "xray:PutTraceSegments"
-        - "xray:PutTelemetryRecords"
-      Resource:
-        - "*"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants