Skip to content

Commit

Permalink
Merge pull request #1461 from ydb-platform/fix-panic
Browse files Browse the repository at this point in the history
* Fixed panic on usage metrics package from prometheus adapter on `tr…
  • Loading branch information
asmyasnikov authored Sep 16, 2024
2 parents 900393f + 1970ee8 commit e3045be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* Fixed panic on usage metrics package from prometheus adapter on `trace.Driver.OnNewStream` callback

## v3.80.3
* Added option `ydb.WithSessionPoolSessionIdleTimeToLive` for restrict idle time of query sessions
* Fixed bug with leak of query transactions
Expand Down
4 changes: 4 additions & 0 deletions metrics/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ func driver(config Config) (t trace.Driver) {
if config.Details()&trace.DriverConnStreamEvents != 0 {
requestStatuses.With(map[string]string{
"status": errorBrief(info.Error),
"endpoint": endpoint,
"node_id": strconv.FormatUint(uint64(nodeID), 10),
}).Inc()
requestMethods.With(map[string]string{
"method": string(method),
"endpoint": endpoint,
"node_id": strconv.FormatUint(uint64(nodeID), 10),
Expand Down

0 comments on commit e3045be

Please sign in to comment.