Search code examples
amazon-web-serviceselasticsearchkibanaaws-xray

How can I view xray trace in ELK?


I am using Elasticsearch + Kibana + Metricbeat for monitoring and logging serverless application in AWS. I have enabled xray for my lambda running in AWS but I don't see there is any solution to view this xray trace in Kibana. What is the best way for me to get xray data into Elasticsearch?


Solution

  • To my knowledge, X-Ray does not have option to put incoming data to stream, not even talking about filtering just sampled data to stream. Yet you always have an option of x-ray base API which is used by all clients.

    Here is CLI documentation, so you can see the overview.

    https://docs.aws.amazon.com/cli/latest/reference/xray/index.html#cli-aws-xray

    Idea would be to get the insights, traces, sampling things. Put that to Elasticsearch with some glue service and then see that data in Kibana. Quite a bit of work though. I would try to contact someone from x-ray team asking if they have plans to introduce option to pipe incoming stream and maybe filter to pipe just sampled data to some Kinesis data stream which you could point to Elasticsearch. That would make such task easy.

    Full service developer guide is here for reference:

    https://docs.aws.amazon.com/xray/latest/devguide/xray-guide.pdf