Skip to content

Commit

Permalink
Sprint on profiles and add Keycloak
Browse files Browse the repository at this point in the history
  • Loading branch information
Romanow committed Jan 10, 2025
1 parent 98e6443 commit 150e281
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,10 @@ class CircuitBreakerConfiguration {
@Bean
fun fallback(circuitBreakerConfigurationSupport: CircuitBreakerConfigurationSupport): Fallback {
return object : Fallback {
override fun <T> apply(
method: HttpMethod,
url: String,
throwable: Throwable,
vararg params: Any
): Mono<T> {
override fun <T> apply(method: HttpMethod, url: String, throwable: Throwable, vararg params: Any): Mono<T> {
logger.warn(
"Request to {} '{}' failed with exception: {}. (params: '{}')",
method.name(),
url,
throwable.message,
params
method.name(), url, throwable.message, params
)
if (throwable.javaClass in circuitBreakerConfigurationSupport.ignoredExceptions()) {
throw (throwable as RuntimeException)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package ru.romanow.inst.services.common.config

import io.micrometer.tracing.exporter.SpanExportingPredicate
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration

@Configuration
@ConditionalOnProperty("management.tracing.enabled", havingValue = "true")
class TracingConfiguration {

@Bean
fun noActuator() = SpanExportingPredicate { it.tags["uri"] == null || !it.tags["uri"]!!.startsWith("/manage") }
}

0 comments on commit 150e281

Please sign in to comment.