Skip to content

Commit d7a5a7c

Browse files
committed
added netflix hystrix and zipkin server
1 parent 9d2c91a commit d7a5a7c

File tree

94 files changed

+3541
-552
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+3541
-552
lines changed

.classpath

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
4+
<classpathentry kind="src" path="APIGateWay/src/main/java"/>
5+
<classpathentry kind="src" path="APIGateWay/src/test/java"/>
6+
<classpathentry kind="src" path="EurekaServerConfiguration/src/main/java"/>
7+
<classpathentry kind="src" path="EurekaServerConfiguration/src/test/java"/>
8+
<classpathentry kind="src" path="TaskService/src/main/java"/>
9+
<classpathentry kind="src" path="TaskService/src/test/java"/>
10+
<classpathentry kind="src" path="TaskSubmissionService/src/main/java"/>
11+
<classpathentry kind="src" path="TaskSubmissionService/src/test/java"/>
12+
<classpathentry kind="src" path="TaskUserService/src/main/java"/>
13+
<classpathentry kind="src" path="TaskUserService/src/test/java"/>
14+
<classpathentry kind="src" path="UserService/src/main/java"/>
15+
<classpathentry kind="src" path="UserService/src/test/java"/>
16+
<classpathentry kind="src" path="ZipkinDemoProject/src/main/java"/>
17+
<classpathentry kind="src" path="ZipkinDemoProject/src/test/java"/>
18+
<classpathentry kind="src" path="ZipkinProject/src/main/java"/>
19+
<classpathentry kind="src" path="ZipkinProject/src/test/java"/>
20+
<classpathentry kind="lib" path="APIGateWay/gradle/wrapper/gradle-wrapper.jar"/>
21+
<classpathentry kind="lib" path="EurekaServerConfiguration/gradle/wrapper/gradle-wrapper.jar"/>
22+
<classpathentry kind="lib" path="TaskService/gradle/wrapper/gradle-wrapper.jar"/>
23+
<classpathentry kind="lib" path="TaskSubmissionService/gradle/wrapper/gradle-wrapper.jar"/>
24+
<classpathentry kind="lib" path="TaskUserService/gradle/wrapper/gradle-wrapper.jar"/>
25+
<classpathentry kind="lib" path="UserService/.mvn/wrapper/maven-wrapper.jar"/>
26+
<classpathentry kind="lib" path="ZipkinDemoProject/.mvn/wrapper/maven-wrapper.jar"/>
27+
<classpathentry kind="lib" path="ZipkinProject/gradle/wrapper/gradle-wrapper.jar"/>
28+
<classpathentry kind="output" path="APIGateWay/bin/main"/>
29+
</classpath>

.idea/.gitignore

-3
This file was deleted.

.idea/gradle.xml

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

+153
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.project

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>Task ManagementSystem</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>

APIGateWay/build.gradle

+13
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ dependencies {
2323
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
2424
testImplementation 'org.springframework.boot:spring-boot-starter-test'
2525
implementation 'org.springframework.cloud:spring-cloud-starter-gateway'
26+
implementation 'org.springframework.boot:spring-boot-starter-actuator'
27+
//zipkin tracing
28+
implementation 'io.micrometer:micrometer-tracing-bridge-brave'
29+
implementation 'io.zipkin.reporter2:zipkin-reporter-brave'
30+
// https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-sleuth
31+
//implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-sleuth', version: '3.1.11'
32+
33+
// Zipkin server dependency
34+
//implementation 'io.zipkin.java:zipkin-server:2.12.9'
35+
36+
// Zipkin autoconfigure UI dependency (runtime scope)
37+
//runtimeOnly 'io.zipkin.java:zipkin-autoconfigure-ui:2.12.9'
38+
2639
}
2740

2841
dependencyManagement {

APIGateWay/src/main/resources/application.yml

+12-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ server:
88
spring:
99
application:
1010
name: API-GATEWAY-SERVER
11+
zipkin:
12+
base-url: http://localhost:9411
13+
sleuth:
14+
sampler:
15+
probability: 1.0
1116
cloud:
1217
gateway:
1318
routes:
@@ -45,7 +50,13 @@ eureka:
4550
service-url:
4651
defaultZone: http://localhost:8085/eureka
4752

48-
53+
54+
55+
56+
57+
58+
59+
4960

5061

5162

EurekaServerConfiguration/build.gradle

+12
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,20 @@ ext {
2222
dependencies {
2323
implementation 'org.springframework.boot:spring-boot-starter-actuator'
2424
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-server'
25+
implementation 'org.springframework.boot:spring-boot-starter-actuator'
2526
developmentOnly 'org.springframework.boot:spring-boot-devtools'
2627
testImplementation 'org.springframework.boot:spring-boot-starter-test'
28+
//zipkin tracing
29+
implementation 'io.micrometer:micrometer-tracing-bridge-brave'
30+
implementation 'io.zipkin.reporter2:zipkin-reporter-brave'
31+
// https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-sleuth
32+
//implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-sleuth', version: '3.1.11'
33+
34+
// Zipkin server dependency
35+
//implementation 'io.zipkin.java:zipkin-server:2.12.9'
36+
37+
// Zipkin autoconfigure UI dependency (runtime scope)
38+
//runtimeOnly 'io.zipkin.java:zipkin-autoconfigure-ui:2.12.9'
2739
}
2840

2941
dependencyManagement {

EurekaServerConfiguration/src/main/java/in/mahesh/tasks/EurekaServerConfigurationApplication.java

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import org.springframework.boot.autoconfigure.SpringBootApplication;
55
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
66

7+
8+
79
@SpringBootApplication
810
@EnableEurekaServer
911
public class EurekaServerConfigurationApplication {

EurekaServerConfiguration/src/main/resources/application.properties

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ eureka.client.register-with-eureka=false
44
eureka.client.fetch-registry=false
55
eureka.client.service-url.defaultZone =http://${eureka.instance.hostname}:${server.port}/eureka
66

7+
#Zipkin server configuration
8+
spring.zipkin.base-url=http://localhost:9411
9+
spring.sleuth.sampler.probability=1.0
10+
11+
712

813

914

0 commit comments

Comments
 (0)