Skip to content

Commit ac73852

Browse files
committed
Polish "Add Kotlin samples for tracing"
See gh-46699
1 parent 1e15cc1 commit ac73852

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/actuator/micrometertracing/baggage/CreatingBaggage.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-present the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,4 +27,5 @@ class CreatingBaggage(private val tracer: Tracer) {
2727
// Business logic
2828
}
2929
}
30-
}
30+
31+
}

spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/actuator/micrometertracing/creatingspans/CustomObservation.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-present the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -30,4 +30,5 @@ class CustomObservation(private val observationRegistry: ObservationRegistry) {
3030
// Business logic ...
3131
}
3232
}
33-
}
33+
34+
}

spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/actuator/micrometertracing/gettingstarted/MyApplication.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-present the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,14 +29,14 @@ class MyApplication {
2929

3030
private val logger: Log = LogFactory.getLog(MyApplication::class.java)
3131

32-
3332
@RequestMapping("/")
3433
fun hello(): String {
3534
logger.info("home() has been called")
3635
return "Hello, World!"
3736
}
37+
3838
}
3939

4040
fun main(args: Array<String>) {
4141
runApplication<MyApplication>(*args)
42-
}
42+
}

0 commit comments

Comments
 (0)