Skip to content

Commit

Permalink
fix(bridge-history): duplicated symbol and metric prefix (#969)
Browse files Browse the repository at this point in the history
Co-authored-by: colinlyguo <[email protected]>
  • Loading branch information
colinlyguo and colinlyguo authored Sep 26, 2023
1 parent 4ec1045 commit 8f745e9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bridge-history-api/internal/route/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func Route(router *gin.Engine, conf *config.Config, reg prometheus.Registerer) {
MaxAge: 12 * time.Hour,
}))

observability.Use(router, "bridge-history", reg)
observability.Use(router, "bridge_history", reg)

r := router.Group("api/")
r.POST("/txsbyhashes", controller.HistoryCtrler.PostQueryTxsByHash)
Expand Down
2 changes: 1 addition & 1 deletion bridge-history-api/observability/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/prometheus/client_golang/prometheus"

"scroll-tech/common/observability/ginmetrics"
"bridge-history-api/observability/ginmetrics"
)

// Use register the gin metric
Expand Down
6 changes: 3 additions & 3 deletions bridge-history-api/observability/probes.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"github.com/gin-gonic/gin"
"gorm.io/gorm"

"scroll-tech/common/database"
"scroll-tech/common/types"
"bridge-history-api/internal/types"
"bridge-history-api/utils"
)

// ProbesController probe check controller
Expand All @@ -22,7 +22,7 @@ func NewProbesController(db *gorm.DB) *ProbesController {

// HealthCheck the api controller for health check
func (a *ProbesController) HealthCheck(c *gin.Context) {
if _, err := database.Ping(a.db); err != nil {
if _, err := utils.Ping(a.db); err != nil {
types.RenderFatal(c, err)
return
}
Expand Down
2 changes: 1 addition & 1 deletion bridge-history-api/observability/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/urfave/cli/v2"
"gorm.io/gorm"

"scroll-tech/common/utils"
"bridge-history-api/utils"
)

// Server starts the metrics server on the given address, will be closed when the given
Expand Down
2 changes: 1 addition & 1 deletion common/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"runtime/debug"
)

var tag = "v4.3.22"
var tag = "v4.3.23"

var commit = func() string {
if info, ok := debug.ReadBuildInfo(); ok {
Expand Down

0 comments on commit 8f745e9

Please sign in to comment.