Skip to content

Commit

Permalink
chore: sync release v1.35.1 to main branch (#5165)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidddddarth authored Oct 3, 2024
2 parents 4468a44 + e17b5ee commit 6171604
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [1.35.1](https://github.com/rudderlabs/rudder-server/compare/v1.35.0...v1.35.1) (2024-10-03)


### Miscellaneous

* remove panic on NewDatabaseSQLStats Register from various reports ([#5163](https://github.com/rudderlabs/rudder-server/issues/5163)) ([af83259](https://github.com/rudderlabs/rudder-server/commit/af832599da56dc8831ac759adadb5531513d1492))

## [1.35.0](https://github.com/rudderlabs/rudder-server/compare/v1.34.1...v1.35.0) (2024-10-01)


Expand Down
3 changes: 2 additions & 1 deletion enterprise/reporting/error_index/error_index_reporting.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/rudderlabs/rudder-go-kit/stats"
"github.com/rudderlabs/rudder-go-kit/stats/collectors"
kitsync "github.com/rudderlabs/rudder-go-kit/sync"
obskit "github.com/rudderlabs/rudder-observability-kit/go/labels"

"github.com/rudderlabs/rudder-server/jobsdb"
. "github.com/rudderlabs/rudder-server/utils/tx" //nolint:staticcheck
Expand Down Expand Up @@ -191,7 +192,7 @@ func (eir *ErrorIndexReporter) DatabaseSyncer(c types.SyncerConfig) types.Report
}
err = eir.statsFactory.RegisterCollector(collectors.NewDatabaseSQLStats("jobsdb-err_idx", dbHandle))
if err != nil {
panic(fmt.Errorf("failed to register collector: %w", err))
eir.log.Errorn("error registering database sql stats", obskit.Error(err))
}
errIndexDB := jobsdb.NewForReadWrite(
"err_idx",
Expand Down
2 changes: 1 addition & 1 deletion enterprise/reporting/error_reporting.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ func (edr *ErrorDetailReporter) migrate(c types.SyncerConfig) (*sql.DB, error) {
dbHandle.SetMaxOpenConns(edr.maxOpenConnections)
err = edr.stats.RegisterCollector(collectors.NewDatabaseSQLStats("error_detail_reporting", dbHandle))
if err != nil {
return nil, fmt.Errorf("could not register database stats collector: %w", err)
edr.log.Errorn("error registering database sql stats", obskit.Error(err))
}

m := &migrator.Migrator{
Expand Down
3 changes: 2 additions & 1 deletion enterprise/reporting/flusher/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/rudderlabs/rudder-go-kit/logger"
"github.com/rudderlabs/rudder-go-kit/stats"
"github.com/rudderlabs/rudder-go-kit/stats/collectors"
obskit "github.com/rudderlabs/rudder-observability-kit/go/labels"
"github.com/rudderlabs/rudder-server/enterprise/reporting/flusher/aggregator"
"github.com/rudderlabs/rudder-server/utils/misc"
)
Expand All @@ -34,7 +35,7 @@ func CreateRunner(ctx context.Context, table string, log logger.Logger, stats st
db.SetMaxOpenConns(maxOpenConns)
err = stats.RegisterCollector(collectors.NewDatabaseSQLStats(fmt.Sprintf("reporting_flusher_%s", table), db))
if err != nil {
return nil, fmt.Errorf("registering collector: %w", err)
log.Errorn("error registering database sql stats", obskit.Error(err))
}

if table == "tracked_users_reports" {
Expand Down
2 changes: 1 addition & 1 deletion enterprise/trackedusers/users_reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (u *UniqueUsersReporter) MigrateDatabase(dbConn string, conf *config.Config
dbHandle.SetMaxOpenConns(1)
err = u.stats.RegisterCollector(collectors.NewDatabaseSQLStats("tracked_users_reports", dbHandle))
if err != nil {
return fmt.Errorf("registering collector: %w", err)
u.log.Errorn("error registering database sql stats", obskit.Error(err))
}

m := &migrator.Migrator{
Expand Down

0 comments on commit 6171604

Please sign in to comment.