Skip to content

Commit e736399

Browse files
authored
Merge pull request #509 from ydb-platform/detailer
* Added `trace.Details.Details()` method for use external detailer
2 parents 2caec1d + 5684511 commit e736399

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## v3.42.1
22
* Fixed lazy transaction example for `godoc`
3+
* Added `trace.Details.Details()` method for use external detailer
34

45
## v3.42.0
56
* Added retry policy options for topics: `topic/topicoptions.WithReaderCheckRetryErrorFunction`, `topic/topicoptions.WithReaderStartTimeout`, `topic/topicoptions.WithWriterCheckRetryErrorFunction`, `topic/topicoptions.WithWriterStartTimeout`

trace/details.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ import (
66

77
type Details uint64
88

9+
func (d Details) Details() Details {
10+
return d
11+
}
12+
913
const (
1014
DriverNetEvents Details = 1 << iota // for bitmask: 1, 2, 4, 8, 16, 32, ...
1115
DriverConnEvents
@@ -92,7 +96,7 @@ const (
9296
)
9397

9498
var (
95-
details = map[Details]string{
99+
detailsMap = map[Details]string{
96100
DriverEvents: "ydb.driver",
97101
DriverBalancerEvents: "ydb.driver.balancer",
98102
DriverNetEvents: "ydb.driver.net",
@@ -180,7 +184,7 @@ func MatchDetails(pattern string, opts ...matchDetailsOption) (d Details) {
180184
if err != nil {
181185
return h.defaultDetails
182186
}
183-
for k, v := range details {
187+
for k, v := range detailsMap {
184188
if re.MatchString(v) {
185189
d |= k
186190
}

0 commit comments

Comments
 (0)