Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
Fjerner unødvendig bean
Browse files Browse the repository at this point in the history
  • Loading branch information
simhos committed Dec 20, 2023
1 parent 32a4ffe commit 1d6ba00
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package no.nav.bidrag.commons.web.config

import io.micrometer.observation.ObservationRegistry
import no.nav.bidrag.commons.web.interceptor.ConsumerIdClientInterceptor
import no.nav.bidrag.commons.web.interceptor.MdcValuesPropagatingClientInterceptor
import org.springframework.boot.actuate.metrics.web.client.ObservationRestTemplateCustomizer
Expand All @@ -10,13 +9,12 @@ import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.Import
import org.springframework.context.annotation.Scope
import org.springframework.http.client.observation.DefaultClientRequestObservationConvention
import java.time.Duration
import java.time.temporal.ChronoUnit

@Suppress("SpringFacetCodeInspection")
@Configuration
@Import(ConsumerIdClientInterceptor::class, MdcValuesPropagatingClientInterceptor::class, NaisProxyCustomizer::class)
@Import(ConsumerIdClientInterceptor::class, MdcValuesPropagatingClientInterceptor::class, NaisProxyCustomizer::class, ObservationRestTemplateCustomizer::class)
class RestTemplateBuilderBean {

@Bean
Expand Down Expand Up @@ -55,9 +53,4 @@ class RestTemplateBuilderBean {
.additionalCustomizers(observationRestTemplateCustomizer)
.setConnectTimeout(Duration.of(15, ChronoUnit.SECONDS))
.setReadTimeout(Duration.of(30, ChronoUnit.SECONDS))

@Bean
fun metricsRestTemplateCustomizer(): ObservationRestTemplateCustomizer {
return ObservationRestTemplateCustomizer(ObservationRegistry.create(), DefaultClientRequestObservationConvention())
}
}

0 comments on commit 1d6ba00

Please sign in to comment.