File tree Expand file tree Collapse file tree 3 files changed +18
-10
lines changed Expand file tree Collapse file tree 3 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 1+ * Fixed tracing details check for some metrics
2+
13## v3.81.2
24* Removed ` experimantal ` comment for query service client
35
Original file line number Diff line number Diff line change @@ -95,10 +95,12 @@ func driver(config Config) (t trace.Driver) {
9595 eventType := repeater .EventType (* info .Context )
9696
9797 return func (info trace.DriverBalancerClusterDiscoveryAttemptDoneInfo ) {
98- balancersDiscoveries .With (map [string ]string {
99- "status" : errorBrief (info .Error ),
100- "cause" : eventType ,
101- }).Inc ()
98+ if config .Details ()& trace .DriverBalancerEvents != 0 {
99+ balancersDiscoveries .With (map [string ]string {
100+ "status" : errorBrief (info .Error ),
101+ "cause" : eventType ,
102+ }).Inc ()
103+ }
102104 }
103105 }
104106 t .OnBalancerUpdate = func (info trace.DriverBalancerUpdateStartInfo ) func (trace.DriverBalancerUpdateDoneInfo ) {
Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ func table(config Config) (t trace.Table) {
2222 with := config .GaugeVec ("with" )
2323 t .OnInit = func (info trace.TableInitStartInfo ) func (trace.TableInitDoneInfo ) {
2424 return func (info trace.TableInitDoneInfo ) {
25- limit .With (nil ).Set (float64 (info .Limit ))
25+ if config .Details ()& trace .TableEvents != 0 {
26+ limit .With (nil ).Set (float64 (info .Limit ))
27+ }
2628 }
2729 }
2830 t .OnSessionNew = func (info trace.TableSessionNewStartInfo ) func (trace.TableSessionNewDoneInfo ) {
@@ -69,11 +71,13 @@ func table(config Config) (t trace.Table) {
6971 return nil
7072 }
7173 t .OnPoolStateChange = func (info trace.TablePoolStateChangeInfo ) {
72- limit .With (nil ).Set (float64 (info .Limit ))
73- index .With (nil ).Set (float64 (info .Index ))
74- idle .With (nil ).Set (float64 (info .Idle ))
75- wait .With (nil ).Set (float64 (info .Wait ))
76- createInProgress .With (nil ).Set (float64 (info .CreateInProgress ))
74+ if config .Details ()& trace .TablePoolEvents != 0 {
75+ limit .With (nil ).Set (float64 (info .Limit ))
76+ index .With (nil ).Set (float64 (info .Index ))
77+ idle .With (nil ).Set (float64 (info .Idle ))
78+ wait .With (nil ).Set (float64 (info .Wait ))
79+ createInProgress .With (nil ).Set (float64 (info .CreateInProgress ))
80+ }
7781 }
7882 {
7983 latency := session .WithSystem ("query" ).TimerVec ("latency" )
You can’t perform that action at this time.
0 commit comments