Ir al contenido principal

Destacado

Spring Cloud Sleuth y StackDriver Trace

Siguiendo con nuestra saga de proyectos de Spring GCP, ahora, nos toca ver Spring Cloud Sleuth.
En proyectos de Arquitectura de Micro servicios es muy importante la información y observabilidad de todo. Si se están realizando llamadas entre servicios A, B y C; es importante entender si estas fueron exitosas o existe latencia entre dichas llamadas.

Nosotros podemos agregar esta dependencia de Sleuth a nuestro proyecto Spring Boot para darle ese "super poder" de tracing distribuido y luego exponer dicha información en un Zipkin o Jaegger por ejemplo.

GCP tiene Stackdriver trace, que es un servicio que nos permite guardar esta data de tracing sin tener que administrar nosotros mismos nuestro Zipking o storage. Stackdriver puede productir reportes de latencia y/o detectar anamalías en la performance.

Existen dos formas de usar Stackdriver Trace en nuestra aplicación Spring Boot:

1. Usas un Stackdriver Trace Zipkin proxy y configurar el Spring Cloud Sleuth para que use este prox…

Mi POM

En JoeDayz estamos por fin mavenizando los proyectos. La verdad Maven es una magnifica opción para administrar nuestros proyectos, ciclos de vida en las fases de desarrollo y administración de dependencias, y no hay que decir, de los buenos reportes que nos genera.

Aquí mi POM con todos los frameworks que estamos usando, una foto explica mas que mil palabras.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.bms</groupId>
<artifactId>incapp</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>incapp Maven J2EE14 Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>

<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1</version>
</dependency>

<dependency>
<groupId>org.acegisecurity</groupId>
<artifactId>acegi-security</artifactId>
<version>1.0.3</version>
<exclusions>
<exclusion>
<artifactId>spring-aop</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-beans</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-context</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-context</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-dao</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-dao</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-jdbc</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-remoting</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-support</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.ajaxanywhere</groupId>
<artifactId>ajaxanywhere</artifactId>
<version>1.2-rc2</version>
</dependency>

<dependency>
<groupId>aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.5.3</version>
</dependency>

<dependency>
<groupId>opensymphony</groupId>
<artifactId>clickstream</artifactId>
<version>1.0.2</version>
</dependency>

<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.6</version>
</dependency>

<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.0</version>
</dependency>

<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.2</version>
</dependency>

<dependency>
<groupId>commons-el</groupId>
<artifactId>commons-el</artifactId>
<version>1.0</version>
</dependency>

<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
</dependency>

<dependency>
<groupId>commons-dbutils</groupId>
<artifactId>commons-dbutils</artifactId>
<version>1.0</version>
</dependency>

<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.1.4</version>
</dependency>

<dependency>
<groupId>com.corda</groupId>
<artifactId>CordaEmbedder</artifactId>
<version>1.0</version>
</dependency>

<dependency>
<groupId>displaytag</groupId>
<artifactId>displaytag</artifactId>
<version>1.1</version>
</dependency>

<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>

<dependency>
<groupId>dwr</groupId>
<artifactId>dwr</artifactId>
<version>1.1.3</version>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>${hibernate.version}</version>
</dependency>

<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
</dependency>

<dependency>
<groupId>javax.servlet.jsp.jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.1.0</version>
</dependency>

<dependency>
<groupId>ldapjdk</groupId>
<artifactId>ldapjdk</artifactId>
<version>1.0</version>
</dependency>

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.8</version>
</dependency>

<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.1</version>
</dependency>

<dependency>
<groupId>opensymphony</groupId>
<artifactId>ognl</artifactId>
<version>2.6.11</version>
</dependency>

<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.3.0</version>
</dependency>

<dependency>
<groupId>opensymphony</groupId>
<artifactId>oscache</artifactId>
<version>2.3</version>
</dependency>

<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.1-FINAL</version>
</dependency>

<dependency>
<groupId>quartz</groupId>
<artifactId>quartz</artifactId>
<version>1.5.2</version>
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.3</version>
</dependency>

<dependency>
<groupId>opensymphony</groupId>
<artifactId>sitemesh</artifactId>
<version>2.3</version>
</dependency>

<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>${spring.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-mock</artifactId>
<version>${spring.version}</version>
<exclusions>
<exclusion>
<artifactId>spring-context</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-core</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-dao</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-jdbc</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-jpa</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-beans</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-support</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-web</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-webmvc</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.springmodules</groupId>
<artifactId>spring-modules-validation</artifactId>
<version>0.5</version>
</dependency>

<dependency>
<groupId>struts-menu</groupId>
<artifactId>struts-menu</artifactId>
<version>2.4.2</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.3.03</version>
</dependency>

<dependency>
<groupId>org.tuckey</groupId>
<artifactId>urlrewrite</artifactId>
<version>2.5.2</version>
</dependency>

<dependency>
<groupId>velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.4</version>
</dependency>

<dependency>
<groupId>velocity-tools</groupId>
<artifactId>velocity-tools-view</artifactId>
<version>1.4</version>
</dependency>

<dependency>
<groupId>commons-jexl</groupId>
<artifactId>commons-jexl</artifactId>
<version>1.0</version>
</dependency>

<dependency>
<groupId>org.javolution</groupId>
<artifactId>javolution</artifactId>
<version>5.2.6</version>
</dependency>

<dependency>
<groupId>jdbm</groupId>
<artifactId>jdbm</artifactId>
<version>1.0</version>
</dependency>

<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
<version>4.0.1</version>
</dependency>

</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.4</source>
<target>1.4</target>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
</plugin>
</plugins>
<finalName>incapp</finalName>
</build>

<properties>
<!-- Application settings -->
<copyright.year>2009</copyright.year>
<dao.framework>hibernate</dao.framework>
<web.framework>spring</web.framework>
<amp.genericCore>true</amp.genericCore>
<amp.fullSource>false</amp.fullSource>

<!-- Framework dependency versions -->
<hibernate.version>3.1.3</hibernate.version>
<spring.version>2.0</spring.version>

<!-- Testing dependency versions -->
<jmock.version>2.4.0</jmock.version>
<jsp.version>2.0</jsp.version>
<servlet.version>2.3</servlet.version>

</properties>
</project>


Maven Aprobado!!!

Comentarios

  1. Are you trying to earn money from your websites/blogs via popunder ads?
    In case you do, have you tried using Pop Ads?

    ResponderEliminar

Publicar un comentario