Skip to content

Commit bf5d896

Browse files
author
m.zharinova
committed
merge from master
2 parents d345b63 + cd6e4de commit bf5d896

File tree

56 files changed

+216
-1652
lines changed

Some content is hidden

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

56 files changed

+216
-1652
lines changed

.editorconfig

Lines changed: 87 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ max_line_length = 199
88
tab_width = 4
99
ij_continuation_indent_size = 4
1010

11-
[*.{java,kt}]
11+
[*.java]
1212
ij_java_imports_layout = *,|,java.**,javax.**,|,$*
1313
ij_java_align_multiline_parameters = true
1414
ij_java_blank_lines_after_class_header = 1
@@ -110,3 +110,89 @@ ij_java_spaces_within_try_parentheses = false
110110
ij_java_spaces_within_while_parentheses = false
111111
ij_java_special_else_if_treatment = true
112112
ij_java_use_single_class_imports = true
113+
114+
[{*.kt,*.kts}]
115+
ij_kotlin_align_in_columns_case_branch = false
116+
ij_kotlin_align_multiline_binary_operation = false
117+
ij_kotlin_align_multiline_extends_list = false
118+
ij_kotlin_align_multiline_method_parentheses = false
119+
ij_kotlin_align_multiline_parameters = true
120+
ij_kotlin_align_multiline_parameters_in_calls = false
121+
ij_kotlin_allow_trailing_comma = false
122+
ij_kotlin_allow_trailing_comma_on_call_site = false
123+
ij_kotlin_assignment_wrap = normal
124+
ij_kotlin_blank_lines_after_class_header = 0
125+
ij_kotlin_blank_lines_around_block_when_branches = 0
126+
ij_kotlin_blank_lines_before_declaration_with_comment_or_annotation_on_separate_line = 1
127+
ij_kotlin_block_comment_add_space = false
128+
ij_kotlin_block_comment_at_first_column = true
129+
ij_kotlin_call_parameters_new_line_after_left_paren = true
130+
ij_kotlin_call_parameters_right_paren_on_new_line = true
131+
ij_kotlin_call_parameters_wrap = on_every_item
132+
ij_kotlin_catch_on_new_line = false
133+
ij_kotlin_class_annotation_wrap = split_into_lines
134+
ij_kotlin_continuation_indent_for_chained_calls = false
135+
ij_kotlin_continuation_indent_for_expression_bodies = false
136+
ij_kotlin_continuation_indent_in_argument_lists = false
137+
ij_kotlin_continuation_indent_in_elvis = false
138+
ij_kotlin_continuation_indent_in_if_conditions = false
139+
ij_kotlin_continuation_indent_in_parameter_lists = false
140+
ij_kotlin_continuation_indent_in_supertype_lists = false
141+
ij_kotlin_else_on_new_line = false
142+
ij_kotlin_enum_constants_wrap = off
143+
ij_kotlin_extends_list_wrap = normal
144+
ij_kotlin_field_annotation_wrap = split_into_lines
145+
ij_kotlin_finally_on_new_line = false
146+
ij_kotlin_if_rparen_on_new_line = true
147+
ij_kotlin_import_nested_classes = false
148+
ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^
149+
ij_kotlin_indent_before_arrow_on_new_line = true
150+
ij_kotlin_insert_whitespaces_in_simple_one_line_method = true
151+
ij_kotlin_keep_blank_lines_before_right_brace = 2
152+
ij_kotlin_keep_blank_lines_in_code = 2
153+
ij_kotlin_keep_blank_lines_in_declarations = 2
154+
ij_kotlin_keep_first_column_comment = true
155+
ij_kotlin_keep_indents_on_empty_lines = false
156+
ij_kotlin_keep_line_breaks = true
157+
ij_kotlin_lbrace_on_next_line = false
158+
ij_kotlin_line_break_after_multiline_when_entry = true
159+
ij_kotlin_line_comment_add_space = false
160+
ij_kotlin_line_comment_add_space_on_reformat = false
161+
ij_kotlin_line_comment_at_first_column = true
162+
ij_kotlin_method_annotation_wrap = split_into_lines
163+
ij_kotlin_method_call_chain_wrap = normal
164+
ij_kotlin_method_parameters_new_line_after_left_paren = true
165+
ij_kotlin_method_parameters_right_paren_on_new_line = true
166+
ij_kotlin_method_parameters_wrap = on_every_item
167+
ij_kotlin_name_count_to_use_star_import = 2147483647
168+
ij_kotlin_name_count_to_use_star_import_for_members = 2147483647
169+
ij_kotlin_packages_to_use_import_on_demand = java.util.*,kotlinx.android.synthetic.**,io.ktor.**
170+
ij_kotlin_parameter_annotation_wrap = off
171+
ij_kotlin_space_after_comma = true
172+
ij_kotlin_space_after_extend_colon = true
173+
ij_kotlin_space_after_type_colon = true
174+
ij_kotlin_space_before_catch_parentheses = true
175+
ij_kotlin_space_before_comma = false
176+
ij_kotlin_space_before_extend_colon = true
177+
ij_kotlin_space_before_for_parentheses = true
178+
ij_kotlin_space_before_if_parentheses = true
179+
ij_kotlin_space_before_lambda_arrow = true
180+
ij_kotlin_space_before_type_colon = false
181+
ij_kotlin_space_before_when_parentheses = true
182+
ij_kotlin_space_before_while_parentheses = true
183+
ij_kotlin_spaces_around_additive_operators = true
184+
ij_kotlin_spaces_around_assignment_operators = true
185+
ij_kotlin_spaces_around_elvis = true
186+
ij_kotlin_spaces_around_equality_operators = true
187+
ij_kotlin_spaces_around_function_type_arrow = true
188+
ij_kotlin_spaces_around_logical_operators = true
189+
ij_kotlin_spaces_around_multiplicative_operators = true
190+
ij_kotlin_spaces_around_range = false
191+
ij_kotlin_spaces_around_relational_operators = true
192+
ij_kotlin_spaces_around_unary_operator = false
193+
ij_kotlin_spaces_around_when_arrow = true
194+
ij_kotlin_variable_annotation_wrap = off
195+
ij_kotlin_while_on_new_line = false
196+
ij_kotlin_wrap_elvis_expressions = 1
197+
ij_kotlin_wrap_expression_body_functions = 1
198+
ij_kotlin_wrap_first_method_in_call_chain = false

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
# Spring Boot Open Telemetry Demo
1+
# Spring Boot OpenTelemetry Demo
2+
3+
A set of small Spring Boot applications to demonstrate OpenTelemetry capabilities and nuances
24

35
[![Java CI](https://github.com/mfvanek/spring-boot-open-telemetry-demo/actions/workflows/tests.yml/badge.svg)](https://github.com/mfvanek/spring-boot-open-telemetry-demo/actions/workflows/tests.yml)
46
[![codecov](https://codecov.io/gh/mfvanek/spring-boot-open-telemetry-demo/graph/badge.svg?token=NUWI02T68G)](https://codecov.io/gh/mfvanek/spring-boot-open-telemetry-demo)
57

8+
## Spring Cloud Sleuth example
9+
10+
If you are looking for a **Spring Boot 2.7.x** example with [Spring Cloud Sleuth](https://spring.io/projects/spring-cloud-sleuth), take a look at version [0.4.1](https://github.com/mfvanek/spring-boot-open-telemetry-demo/releases/tag/v.0.4.1)
11+
612
## Local run from IDEA
713

814
### Start containers
@@ -19,7 +25,7 @@ docker-compose --file docker/docker-compose-base.yml --project-name="spring-boo
1925
### Start applications
2026

2127
```shell
22-
./gradlew spring-boot-2-demo-app:bootRun
28+
./gradlew spring-boot-3-demo-app-kotlin:bootRun
2329
```
2430

2531
```shell
@@ -38,9 +44,9 @@ curl http://localhost:8080/current-time
3844

3945
#### Other endpoints
4046

41-
* [Swagger UI SB2](http://localhost:8091/actuator/swagger-ui)
42-
* [Prometheus metrics SB2](http://localhost:8091/actuator/prometheus)
43-
* [Health SB2](http://localhost:8091/actuator/health)
47+
* [Swagger UI](http://localhost:8085/actuator/swagger-ui)
48+
* [Prometheus metrics](http://localhost:8085/actuator/prometheus)
49+
* [Health](http://localhost:8085/actuator/health)
4450

4551
## Run in Docker
4652

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description = "Experiments with Java"
99

1010
allprojects {
1111
group = "io.github.mfvanek"
12-
version = "0.4.0"
12+
version = "0.5.0"
1313

1414
repositories {
1515
mavenLocal()
@@ -19,7 +19,7 @@ allprojects {
1919

2020
tasks {
2121
wrapper {
22-
gradleVersion = "8.13"
22+
gradleVersion = "8.14.3"
2323
}
2424
}
2525

buildSrc/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ repositories {
77
}
88

99
dependencies {
10-
implementation("net.ltgt.gradle:gradle-errorprone-plugin:4.1.0")
11-
implementation("io.freefair.gradle:lombok-plugin:8.13.1")
10+
implementation("net.ltgt.gradle:gradle-errorprone-plugin:4.2.0")
11+
implementation("io.freefair.gradle:lombok-plugin:8.14")
1212
implementation("com.bmuschko:gradle-docker-plugin:9.4.0")
1313
implementation("gradle.plugin.com.google.gradle:osdetector-gradle-plugin:1.7.3")
1414
implementation("de.thetaphi:forbiddenapis:3.9")
15-
implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:6.1.7")
15+
implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:6.1.13")
1616
implementation("org.gradle:test-retry-gradle-plugin:1.6.2")
1717
val kotlinVersion = "2.0.21"
1818
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")

buildSrc/src/main/kotlin/sb-ot-demo.java-compile.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ dependencies {
2626
java {
2727
sourceCompatibility = JavaVersion.VERSION_21
2828
targetCompatibility = JavaVersion.VERSION_21
29-
withJavadocJar()
3029
withSourcesJar()
3130
}
3231

buildSrc/src/main/kotlin/sb-ot-demo.java-conventions.gradle.kts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,30 +37,31 @@ dependencies {
3737
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
3838
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
3939

40-
errorprone("com.google.errorprone:error_prone_core:2.36.0")
41-
errorprone("jp.skypencil.errorprone.slf4j:errorprone-slf4j:0.1.28")
40+
errorprone("com.google.errorprone:error_prone_core:2.39.0")
41+
errorprone("jp.skypencil.errorprone.slf4j:errorprone-slf4j:0.1.29")
4242

4343
spotbugsPlugins("jp.skypencil.findbugs.slf4j:bug-pattern:1.5.0")
44-
spotbugsPlugins("com.h3xstream.findsecbugs:findsecbugs-plugin:1.13.0")
45-
spotbugsPlugins("com.mebigfatguy.sb-contrib:sb-contrib:7.6.9")
44+
spotbugsPlugins("com.h3xstream.findsecbugs:findsecbugs-plugin:1.14.0")
45+
spotbugsPlugins("com.mebigfatguy.sb-contrib:sb-contrib:7.6.11")
4646
}
4747

4848
checkstyle {
49-
toolVersion = "10.21.1"
49+
toolVersion = "10.24.0"
5050
configFile = file("${rootDir}/config/checkstyle/checkstyle.xml")
5151
isIgnoreFailures = false
5252
maxWarnings = 0
5353
maxErrors = 0
5454
}
5555

5656
pmd {
57-
toolVersion = "7.9.0"
57+
toolVersion = "7.14.0"
5858
isConsoleOutput = true
5959
ruleSetFiles = files("${rootDir}/config/pmd/pmd.xml")
6060
ruleSets = listOf()
6161
}
6262

6363
spotbugs {
64+
toolVersion.set("4.9.3")
6465
showProgress.set(true)
6566
effort.set(Effort.MAX)
6667
reportLevel.set(Confidence.LOW)

buildSrc/src/main/kotlin/sb-ot-demo.kotlin-conventions.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@ detekt {
4343
buildUponDefaultConfig = true
4444
autoCorrect = true
4545
}
46+
47+
tasks {
48+
test {
49+
dependsOn(detektMain, detektTest)
50+
}
51+
}

common-internal-bom/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ javaPlatform {
1717

1818
dependencies {
1919
api(platform("org.assertj:assertj-bom:3.27.3"))
20-
api(platform("org.testcontainers:testcontainers-bom:1.21.0"))
21-
api(platform("org.junit:junit-bom:5.12.2"))
22-
api(platform("io.github.mfvanek:pg-index-health-bom:0.14.6"))
20+
api(platform("org.testcontainers:testcontainers-bom:1.21.3"))
21+
api(platform("org.junit:junit-bom:5.13.3"))
22+
api(platform("io.github.mfvanek:pg-index-health-bom:0.20.2"))
2323

2424
constraints {
2525
api("org.liquibase:liquibase-core:4.32.0")
2626
api("com.github.blagerweij:liquibase-sessionlock:1.6.9")
2727
api("org.awaitility:awaitility:4.3.0")
2828
api("com.zaxxer:HikariCP:6.3.0")
29-
api("org.postgresql:postgresql:42.7.5")
29+
api("org.postgresql:postgresql:42.7.7")
3030
}
3131
}

docker/docker-compose-full.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ include:
22
- docker-compose-base.yml
33

44
services:
5-
spring-boot-2-demo-app:
6-
container_name: spring_boot_2_demo_app
7-
image: spring-boot-2-demo-app:latest
5+
spring-boot-3-demo-app:
6+
container_name: spring_boot_3_demo_app
7+
image: spring-boot-3-demo-app:latest
88
environment:
99
- SPRING_PROFILES_ACTIVE=docker
1010
ports:
11-
- "8090:8090"
12-
- "8091:8091"
11+
- "8080:8080"
12+
- "8085:8085"
1313
restart: unless-stopped
1414
depends_on:
1515
jaeger:
@@ -22,14 +22,14 @@ services:
2222
networks:
2323
- jaeger-example
2424

25-
spring-boot-3-demo-app:
26-
container_name: spring_boot_3_demo_app
27-
image: spring-boot-3-demo-app:latest
25+
spring-boot-3-demo-app-kotlin:
26+
container_name: spring_boot_3_demo_app_kotlin
27+
image: spring-boot-3-demo-app-kotlin:latest
2828
environment:
2929
- SPRING_PROFILES_ACTIVE=docker
3030
ports:
31-
- "8080:8080"
32-
- "8085:8085"
31+
- "8090:8090"
32+
- "8091:8091"
3333
restart: unless-stopped
3434
depends_on:
3535
jaeger:

gradle/libs.versions.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[versions]
22
detekt = "1.23.8"
3-
spring-boot-v3 = "3.4.4"
3+
spring-boot-v3 = "3.5.3"
44

55
[libraries]
66
detekt = { group = "io.gitlab.arturbosch.detekt", name = "detekt-gradle-plugin", version.ref = "detekt" }
77
detekt-formatting = { group = "io.gitlab.arturbosch.detekt", name = "detekt-formatting", version.ref = "detekt" }
88
detekt-libraries = { group = "io.gitlab.arturbosch.detekt", name = "detekt-rules-libraries", version.ref = "detekt" }
99
spring-boot-v3-dependencies = { group = "org.springframework.boot", name = "spring-boot-dependencies", version.ref = "spring-boot-v3" }
10-
springdoc-openapi = "org.springdoc:springdoc-openapi:2.8.6"
11-
spring-cloud = "org.springframework.cloud:spring-cloud-dependencies:2024.0.1"
12-
datasource-micrometer = "net.ttddyy.observation:datasource-micrometer-spring-boot:1.1.1"
13-
logstash = "net.logstash.logback:logstash-logback-encoder:8.0"
10+
springdoc-openapi = "org.springdoc:springdoc-openapi-bom:2.8.9"
11+
spring-cloud = "org.springframework.cloud:spring-cloud-dependencies:2025.0.0"
12+
datasource-micrometer = "net.ttddyy.observation:datasource-micrometer-spring-boot:1.1.2"
13+
logstash = "net.logstash.logback:logstash-logback-encoder:8.1"
1414

1515
[plugins]
1616
spring-boot-v3 = { id = "org.springframework.boot", version.ref = "spring-boot-v3" }

0 commit comments

Comments
 (0)