Is there a way to enable X-Ray from the serverless.yml for Lambda functions? I've added the X-Ray permissions in the file:
iamRoleStatements:
- Effect: "Allow"
Resource: "*"
Action:
- "xray:*"
But Advanced Tracing still needs to be manually enabled in the AWS console.
AWS X-Ray is an important component in the AWS serverless stack that enables developers to conduct performance analysis and debug distributed microservice-based applications.
When you deploy a service, all functions, events and resources in serverless. yml are translated to an AWS CloudFormation template and deployed as a single CloudFormation stack. Check out the deployment guide to learn more about deployments and how they work.
X-Ray tracing is currently not supported for Lambda functions with Amazon Managed Streaming for Apache Kafka (Amazon MSK), self-managed Apache Kafka, or Amazon MQ with ActiveMQ and RabbitMQ event source mappings.
See the serverless documentation:
https://serverless.com/framework/docs/providers/aws/guide/functions/#aws-x-ray-tracing
service: myService
provider:
name: aws
runtime: nodejs8.10
tracing:
lambda: true
See also tracing for api gateway: https://serverless.com/framework/docs/providers/aws/events/apigateway/#aws-x-ray-tracing
# serverless.yml
provider:
name: aws
tracing:
apiGateway: true
It's in development. If you're unwilling to wait until the official functionality is released, you can install the plugin until it's ready.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With