internal/gcp: rename metrics to gcpmetrics
Change-Id: I86f2dfdc4e02e8f956f583b1acfb1ad1a864a9d1
Reviewed-on: https://go-review.googlesource.com/c/oscar/+/607135
Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/internal/gaby/main.go b/internal/gaby/main.go
index 41b32bf..48d7c78 100644
--- a/internal/gaby/main.go
+++ b/internal/gaby/main.go
@@ -26,9 +26,9 @@
"golang.org/x/oscar/internal/embeddocs"
"golang.org/x/oscar/internal/gcp/firestore"
"golang.org/x/oscar/internal/gcp/gcphandler"
+ "golang.org/x/oscar/internal/gcp/gcpmetrics"
"golang.org/x/oscar/internal/gcp/gcpsecret"
"golang.org/x/oscar/internal/gcp/gemini"
- "golang.org/x/oscar/internal/gcp/metrics"
"golang.org/x/oscar/internal/github"
"golang.org/x/oscar/internal/githubdocs"
"golang.org/x/oscar/internal/llm"
@@ -219,7 +219,7 @@
}
g.secret = sdb
- shutdown, err = metrics.Init(g.ctx, g.slog, flags.project)
+ shutdown, err = gcpmetrics.Init(g.ctx, g.slog, flags.project)
if err != nil {
log.Fatal(err)
}
@@ -250,7 +250,7 @@
// serveHTTP serves HTTP endpoints for Gaby.
func (g *Gaby) serveHTTP() {
- cronCounter := metrics.NewCounter(metricName("crons"), "number of /cron requests")
+ cronCounter := gcpmetrics.NewCounter(metricName("crons"), "number of /cron requests")
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Gaby\n")
diff --git a/internal/gcp/metrics/metrics.go b/internal/gcp/gcpmetrics/metrics.go
similarity index 97%
rename from internal/gcp/metrics/metrics.go
rename to internal/gcp/gcpmetrics/metrics.go
index 6d0ca7b..400fb0c 100644
--- a/internal/gcp/metrics/metrics.go
+++ b/internal/gcp/gcpmetrics/metrics.go
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Package metrics supports gathering and publishing metrics
+// Package gcpmetrics supports gathering and publishing metrics
// on GCP using OpenTelemetry.
-package metrics
+package gcpmetrics
import (
"context"
diff --git a/internal/gcp/metrics/metrics_test.go b/internal/gcp/gcpmetrics/metrics_test.go
similarity index 97%
rename from internal/gcp/metrics/metrics_test.go
rename to internal/gcp/gcpmetrics/metrics_test.go
index fe32c65..d1eb892 100644
--- a/internal/gcp/metrics/metrics_test.go
+++ b/internal/gcp/gcpmetrics/metrics_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package metrics
+package gcpmetrics
import (
"context"