Compare commits

..

2 Commits

Author SHA1 Message Date
9015d78b37 metrics test
All checks were successful
Gradle Build on PR / call-gradle-build (pull_request) Successful in 4m0s
Publish Snapshot / call-publish (push) Successful in 6m28s
2025-09-21 07:29:13 +02:00
67dbd928fd trace test
All checks were successful
Gradle Build on PR / call-gradle-build (pull_request) Successful in 2m59s
Publish Snapshot / call-publish (push) Successful in 3m30s
2025-09-19 11:36:31 +02:00
3 changed files with 33 additions and 1 deletions

9
.http/actuator.http Normal file
View 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

View File

@@ -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)

View File

@@ -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