Skip to content

Commit badbfc0

Browse files
authored
Merge pull request #1684 from hurd54/metric-ydb_go_sdk_ydb_info
Add a new metric ydb_go_sdk_ydb_info with the current version of the SDK
2 parents 21433f7 + cefb0c5 commit badbfc0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* Added a new metric `ydb_go_sdk_ydb_info` with the current version of the SDK
2+
13
## v3.101.1
24
* Changed allowBanned=false for preferred node connections
35

metrics/driver.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"sync"
66

77
"github.com/ydb-platform/ydb-go-sdk/v3/internal/repeater"
8+
"github.com/ydb-platform/ydb-go-sdk/v3/internal/version"
89
"github.com/ydb-platform/ydb-go-sdk/v3/internal/xerrors"
910
"github.com/ydb-platform/ydb-go-sdk/v3/trace"
1011
)
@@ -13,6 +14,7 @@ import (
1314
//
1415
//nolint:funlen
1516
func driver(config Config) (t trace.Driver) {
17+
config.GaugeVec("info", "version").With(map[string]string{"version": version.Version}).Set(1)
1618
config = config.WithSystem("driver")
1719
endpoints := config.WithSystem("balancer").GaugeVec("endpoints", "az")
1820
balancersDiscoveries := config.WithSystem("balancer").CounterVec("discoveries", "status", "cause")

0 commit comments

Comments
 (0)