Commit 96c990e3 authored by femiadeyemi's avatar femiadeyemi
Browse files

expose the spring application metrics

Motivation:

To gain insight on marketplace-app, the spring framework provide
the facility to expose the application metrics to monitoring
service like Prometheus on Kubernetes.

Modification:

- enable graceful shutdown
- add spring boot actuator and prometheus registry micrometer
    dependencies
- expose the actuator endpoint that will provides: health,
   info, metric etc.
- avoid 404 error on request to /favicon.ico
- add a mapping for '/scripts/config.js' and generate the necessary
    configuration parameter for the web-app static file. This enable
    us to configure the cerebrum endpoint.

Results:

This application now makes it metrics available and can be shutdown
gracefully. Also, moved the config javascript into the application.

Target: master
parent fb3f4611
Pipeline #78537 failed with stages
in 4 minutes and 46 seconds
......@@ -4,7 +4,6 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler;
@Configuration
......@@ -18,9 +17,6 @@ public class HelmholtzMarketplaceServerSecurityConfig extends WebSecurityConfigu
// @formatter:off
http
.csrf().disable()
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
.and()
.authorizeRequests(requests -> requests
.antMatchers("/**", "/tokens", "/error", "/actuator/**", "/favicon.ico").permitAll()
.anyRequest().authenticated()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment