From ee5a085fdedf7fbf1984b835f260b652de2bca78 Mon Sep 17 00:00:00 2001 From: felixncheng Date: Tue, 10 Oct 2023 17:04:16 +0800 Subject: [PATCH] =?UTF-8?q?bug:=20=E4=BF=AE=E5=A4=8Dmetrics=E8=AE=BF?= =?UTF-8?q?=E9=97=AE=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98=20#1241?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bkrepo/fs/server/filter/ReactiveRequestContextFilter.kt | 3 +++ .../com/tencent/bkrepo/fs/server/metrics/ServerMetrics.kt | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/backend/fs/boot-fs-server/src/main/kotlin/com/tencent/bkrepo/fs/server/filter/ReactiveRequestContextFilter.kt b/src/backend/fs/boot-fs-server/src/main/kotlin/com/tencent/bkrepo/fs/server/filter/ReactiveRequestContextFilter.kt index 9867e1e81a..df8e4e770a 100644 --- a/src/backend/fs/boot-fs-server/src/main/kotlin/com/tencent/bkrepo/fs/server/filter/ReactiveRequestContextFilter.kt +++ b/src/backend/fs/boot-fs-server/src/main/kotlin/com/tencent/bkrepo/fs/server/filter/ReactiveRequestContextFilter.kt @@ -29,11 +29,14 @@ package com.tencent.bkrepo.fs.server.filter import com.tencent.bkrepo.fs.server.context.ReactiveRequestContextHolder import com.tencent.bkrepo.fs.server.context.RequestContext +import org.springframework.core.Ordered +import org.springframework.core.annotation.Order import org.springframework.web.server.ServerWebExchange import org.springframework.web.server.WebFilter import org.springframework.web.server.WebFilterChain import reactor.core.publisher.Mono +@Order(Ordered.HIGHEST_PRECEDENCE) class ReactiveRequestContextFilter : WebFilter { override fun filter(exchange: ServerWebExchange, chain: WebFilterChain): Mono { diff --git a/src/backend/fs/boot-fs-server/src/main/kotlin/com/tencent/bkrepo/fs/server/metrics/ServerMetrics.kt b/src/backend/fs/boot-fs-server/src/main/kotlin/com/tencent/bkrepo/fs/server/metrics/ServerMetrics.kt index b526bb0ff0..e093cdbd29 100644 --- a/src/backend/fs/boot-fs-server/src/main/kotlin/com/tencent/bkrepo/fs/server/metrics/ServerMetrics.kt +++ b/src/backend/fs/boot-fs-server/src/main/kotlin/com/tencent/bkrepo/fs/server/metrics/ServerMetrics.kt @@ -45,7 +45,7 @@ class ServerMetrics : MeterBinder { } companion object { - const val FILE_DOWNLOAD_COUNT = "file_download_count" - const val FILE_UPLOAD_COUNT = "file_upload_count" + const val FILE_DOWNLOAD_COUNT = "artifact.downloading.count" + const val FILE_UPLOAD_COUNT = "artifact.uploading.count" } }