generated from aura-ascend/template-service
Compare commits
3 Commits
bab33b131a
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 9015d78b37 | |||
| 67dbd928fd | |||
| aa32d52111 |
9
.http/actuator.http
Normal file
9
.http/actuator.http
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
### Thing
|
||||||
|
GET http://localhost:8080/actuator
|
||||||
|
|
||||||
|
### info
|
||||||
|
GET http://localhost:8080/actuator/info
|
||||||
|
|
||||||
|
### Prometheus
|
||||||
|
GET http://localhost:8080/actuator/prometheus
|
||||||
|
|
||||||
@@ -14,6 +14,12 @@ dependencies {
|
|||||||
implementation(aa.springboot.starter.actuator)
|
implementation(aa.springboot.starter.actuator)
|
||||||
implementation(aa.springboot.starter.webflux)
|
implementation(aa.springboot.starter.webflux)
|
||||||
|
|
||||||
|
implementation("io.micrometer:micrometer-registry-otlp")
|
||||||
|
implementation("io.micrometer:micrometer-registry-prometheus")
|
||||||
|
implementation("io.micrometer:micrometer-tracing")
|
||||||
|
implementation("io.micrometer:micrometer-tracing-bridge-otel")
|
||||||
|
implementation("io.opentelemetry:opentelemetry-exporter-otlp")
|
||||||
|
|
||||||
testImplementation(aa.kotlin.junit5)
|
testImplementation(aa.kotlin.junit5)
|
||||||
testImplementation(aa.kotlinx.coroutines.test)
|
testImplementation(aa.kotlinx.coroutines.test)
|
||||||
testImplementation(aa.springboot.starter.test)
|
testImplementation(aa.springboot.starter.test)
|
||||||
|
|||||||
14
src/main/kotlin/ltd/lulz/controller/HomeController.kt
Normal file
14
src/main/kotlin/ltd/lulz/controller/HomeController.kt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
package ltd.lulz.controller
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping
|
||||||
|
import org.springframework.web.bind.annotation.RestController
|
||||||
|
import reactor.core.publisher.Mono
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/")
|
||||||
|
class HomeController {
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
fun home(): Mono<String> = Mono.just("Hello World")
|
||||||
|
}
|
||||||
@@ -17,12 +17,17 @@ management:
|
|||||||
show-details: always
|
show-details: always
|
||||||
info:
|
info:
|
||||||
access: read_only
|
access: read_only
|
||||||
|
prometheus:
|
||||||
|
access: read_only
|
||||||
endpoints:
|
endpoints:
|
||||||
access:
|
access:
|
||||||
default: none
|
default: none
|
||||||
web:
|
web:
|
||||||
exposure:
|
exposure:
|
||||||
include: "health,info"
|
include: "health,info,prometheus"
|
||||||
|
tracing:
|
||||||
|
sampling:
|
||||||
|
probability: '1.0'
|
||||||
|
|
||||||
---
|
---
|
||||||
###########################
|
###########################
|
||||||
@@ -50,3 +55,15 @@ spring:
|
|||||||
config:
|
config:
|
||||||
activate:
|
activate:
|
||||||
on-profile: kubernetes
|
on-profile: kubernetes
|
||||||
|
|
||||||
|
management:
|
||||||
|
otlp:
|
||||||
|
tracing:
|
||||||
|
endpoint: http://opentelemetry-collector.observability.svc.cluster.local:4318/v1/traces
|
||||||
|
metrics:
|
||||||
|
export:
|
||||||
|
url: http://opentelemetry-collector.observability.svc.cluster.local:4318/v1/metrics # Or gRPC: http://... but stick to HTTP for consistency
|
||||||
|
metrics:
|
||||||
|
export:
|
||||||
|
otlp:
|
||||||
|
step: 30s # Optional: Push every 30s for demo; default 60s
|
||||||
|
|||||||
Reference in New Issue
Block a user