Skip to content

Commit

Permalink
Remove unused version field
Browse files Browse the repository at this point in the history
  • Loading branch information
deniszh committed May 21, 2024
1 parent 5b11c90 commit aef8815
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion carbon/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ func (app *App) startPersister() {
}

// Start starts
func (app *App) Start(version string) (err error) {
func (app *App) Start() (err error) {
app.Lock()
defer app.Unlock()

Expand Down Expand Up @@ -580,6 +580,9 @@ func (app *App) Start(version string) (err error) {
if conf.Prometheus.Enabled {
carbonserver.InitPrometheus(app.PromRegisterer)
}
if conf.Tracing.Enabled {
log.Printf("Otel tracing is removed in current verion, ignoring tracing.enabled=true")
}

carbonserver.RegisterInternalInfoHandler("cache", core.GetInfo)
carbonserver.RegisterInternalInfoHandler("config", func() map[string]interface{} {
Expand Down
4 changes: 2 additions & 2 deletions carbon/app_stop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestStartStop(t *testing.T) {
app := New(configFile)

assert.NoError(app.ParseConfig())
assert.NoError(app.Start("test-version"))
assert.NoError(app.Start())

app.Stop()
})
Expand Down Expand Up @@ -51,7 +51,7 @@ func TestReloadAndCollectorDeadlock(t *testing.T) {
assert.NoError(t, app.ParseConfig())

app.Config.Common.MetricInterval = &Duration{time.Microsecond}
assert.NoError(t, app.Start("test-version"))
assert.NoError(t, app.Start())

reloadChan := make(chan struct{}, 1)
N := 1024
Expand Down
2 changes: 1 addition & 1 deletion go-carbon.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func main() {
app.PromRegisterer.MustRegister(prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{}))
http.Handle(cfg.Prometheus.Endpoint, promhttp.HandlerFor(app.PromRegistry, promhttp.HandlerOpts{}))
}
if err = app.Start(BuildVersion); err != nil {
if err = app.Start(); err != nil {
mainLogger.Fatal(err.Error())
} else {
mainLogger.Info("started")
Expand Down

0 comments on commit aef8815

Please sign in to comment.