Feature/fixing prometheus (#745)

* Fixing prometheus so that it actually works. Also seems related to https://github.com/micrometer-metrics/micrometer/issues/5093

* cleaning up override

* Limiting exposure

* Added docs

* Added smoketest for prometheus endpoint

* Removing metrics and prometheus exposure by default

* Removing 'info'
Adding parameterized tests for endpoints

* Reintroduced 'info'

* Remove info

* Adjusted comment
This commit is contained in:
Jens Kristian Villadsen
2024-10-04 17:25:33 +02:00
committed by GitHub
parent e2d2ea7726
commit 40e5b4c10d
5 changed files with 97 additions and 25 deletions

View File

@@ -1,31 +1,37 @@
#Uncomment the "servlet" and "context-path" lines below to make the fhir endpoint available at /example/path/fhir instead of the default value of /fhir
server:
# servlet:
# context-path: /example/path
# servlet:
# context-path: /example/path
port: 8080
#Adds the option to go to eg. http://localhost:8080/actuator/health for seeing the running configuration
#see https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.endpoints
management:
#The following configuration will enable the actuator endpoints at /actuator/health, /actuator/info, /actuator/prometheus, /actuator/metrics. For security purposes, only /actuator/health is enabled by default.
endpoints:
enabled-by-default: false
web:
exposure:
include: 'health' # or e.g. 'info,health,prometheus,metrics' or '*' for all'
endpoint:
endpoints:
enabled-by-default: false
web:
exposure:
include: health,prometheus
info:
enabled: true
metrics:
enabled: true
health:
enabled: true
probes:
enabled: true
livenessState:
enabled: true
readinessState:
enabled: true
group:
liveness:
include:
- livenessState
- readinessState
prometheus:
enabled: true
metrics:
export:
enabled: true
prometheus:
metrics:
export:
enabled: true
spring:
main:
allow-circular-references: true

View File

@@ -6,10 +6,32 @@ server:
#Adds the option to go to eg. http://localhost:8080/actuator/health for seeing the running configuration
#see https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.endpoints
management:
#The following configuration will enable the actuator endpoints at /actuator/health, /actuator/info, /actuator/prometheus, /actuator/metrics. For security purposes, only /actuator/health is enabled by default.
endpoints:
enabled-by-default: false
web:
exposure:
include: "health,prometheus"
include: 'health' # or e.g. 'info,health,prometheus,metrics' or '*' for all'
endpoint:
info:
enabled: true
metrics:
enabled: true
health:
enabled: true
probes:
enabled: true
group:
liveness:
include:
- livenessState
- readinessState
prometheus:
enabled: true
prometheus:
metrics:
export:
enabled: true
spring:
main:
allow-circular-references: true