Git Product home page Git Product logo

spring-boot-aws-xray-sample's Introduction

spring-boot-aws-xray-sample for AWS XRay

Hits Java License Gitpod Codacy Badge Build Status Maven Package Java CI with Maven

As the transition to MSA-oriented application services accelerates, it becomes more important to track complex invocation relationships between microservices. AWS provides the X-Ray service as a service for tracking and managing the call relationships between many of these services. This service integrates with AWS's API Gateway service, making it easy to monitor the call relationship to service requests and the performance of your application calls. However, it does require a bit of coding to track execution within the application. It is therefore open source providing sample code for easy integration of X-Ray tracing into SpringBoot applications. This feature leverages SpringBoot's AOP capabilities to provide an easy way to apply X-Ray without affecting existing application code.

AWS X-Ray Screenshot

Screenshot of the AWS X-Ray Trace console

Features

  1. Incoming Servlet request tracing with Spring AOP
  2. Outgoing HttpRequest tracing with FeignClient
  3. Database Query tracing with HikariCP

Description

config/AWSXRayConfig.java

  • Configure SpringBoot Project Preferences for AWS X-Ray

config/AWSXRayInspector.java

  • Configuration of trace function for bean execution in SpringBoot with AOP
  • Bean scope setting for tracking by Annotation setting
@Pointcut("@within(com.amazonaws.xray.spring.aop.XRayEnabled) && (bean(*Controller) || bean(*Service) || bean(*Client) || bean(*Mapper))")  

config/AWSXRayFeignClientConfig.java

  • Configure tracing function for FeignClient execution for outbound request tracing

config/AWSXRayHikariConfig.java

  • Set up integration with HikariCP for tracking database calls

config/AWSXRayTracingConnection.java, AWSXRayTracingDataSource.java, AWSXRayTracingStatement.java

  • Configure tracking function for query invocation by providing wrapping function for JDBC configuration objects

spring-boot-aws-xray-sample's People

Contributors

anthunt avatar codacy-badger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

spring-boot-aws-xray-sample's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.