mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
gVisor metrics: Move the metric server to its own package.
PiperOrigin-RevId: 533254583
This commit is contained in:
committed by
gVisor bot
parent
6b317756e8
commit
f105ee555d
+1
-4
@@ -53,7 +53,6 @@ go_library(
|
||||
visibility = ["//runsc:__subpackages__"],
|
||||
deps = [
|
||||
"//pkg/abi/linux",
|
||||
"//pkg/atomicbitops",
|
||||
"//pkg/cleanup",
|
||||
"//pkg/coretag",
|
||||
"//pkg/coverage",
|
||||
@@ -66,10 +65,8 @@ go_library(
|
||||
"//pkg/sentry/kernel",
|
||||
"//pkg/sentry/kernel/auth",
|
||||
"//pkg/sentry/platform",
|
||||
"//pkg/state",
|
||||
"//pkg/state/pretty",
|
||||
"//pkg/state/statefile",
|
||||
"//pkg/sync",
|
||||
"//pkg/unet",
|
||||
"//pkg/urpc",
|
||||
"//runsc/boot",
|
||||
@@ -80,9 +77,9 @@ go_library(
|
||||
"//runsc/flag",
|
||||
"//runsc/fsgofer",
|
||||
"//runsc/fsgofer/filter",
|
||||
"//runsc/metricserver",
|
||||
"//runsc/mitigate",
|
||||
"//runsc/profile",
|
||||
"//runsc/sandbox",
|
||||
"//runsc/specutils",
|
||||
"@com_github_google_subcommands//:go_default_library",
|
||||
"@com_github_opencontainers_runtime_spec//specs-go:go_default_library",
|
||||
|
||||
@@ -26,6 +26,7 @@ import (
|
||||
"gvisor.dev/gvisor/runsc/config"
|
||||
"gvisor.dev/gvisor/runsc/container"
|
||||
"gvisor.dev/gvisor/runsc/flag"
|
||||
"gvisor.dev/gvisor/runsc/metricserver"
|
||||
)
|
||||
|
||||
// MetricExport implements subcommands.Command for the "metric-export" command.
|
||||
@@ -71,7 +72,7 @@ func (m *MetricExport) Execute(ctx context.Context, f *flag.FlagSet, args ...any
|
||||
util.Fatalf("loading container: %v", err)
|
||||
}
|
||||
|
||||
prometheusLabels, err := sandboxPrometheusLabels(cont)
|
||||
prometheusLabels, err := metricserver.SandboxPrometheusLabels(cont)
|
||||
if err != nil {
|
||||
util.Fatalf("Cannot compute Prometheus labels of sandbox: %v", err)
|
||||
}
|
||||
|
||||
+11
-1142
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,26 @@
|
||||
load("//tools:defs.bzl", "go_library")
|
||||
|
||||
package(
|
||||
default_applicable_licenses = ["//:license"],
|
||||
licenses = ["notice"],
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "metricserver",
|
||||
srcs = [
|
||||
"metricserver.go",
|
||||
],
|
||||
visibility = ["//runsc:__subpackages__"],
|
||||
deps = [
|
||||
"//pkg/abi/linux",
|
||||
"//pkg/atomicbitops",
|
||||
"//pkg/log",
|
||||
"//pkg/prometheus",
|
||||
"//pkg/sentry/control",
|
||||
"//pkg/state",
|
||||
"//pkg/sync",
|
||||
"//runsc/config",
|
||||
"//runsc/container",
|
||||
"//runsc/sandbox",
|
||||
],
|
||||
)
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user