@@ -60,27 +60,27 @@ private void poolMetrics(boolean verbose, DataSourcePool pool, String tag) {
60
60
if (verbose ) {
61
61
poolMetrics (pool , tag );
62
62
} else {
63
- reporter .gaugeWithTimestamp ("db .pool.size" , pool .size (), epochSecs , dbTag , tag );
63
+ reporter .gaugeWithTimestamp ("datasource .pool.size" , pool .size (), epochSecs , dbTag , tag );
64
64
}
65
65
}
66
66
67
67
private void poolMetrics (DataSourcePool pool , String tag ) {
68
68
PoolStatus status = pool .status (true );
69
69
int size = status .busy () + status .free ();
70
- reporter .gaugeWithTimestamp ("db .pool.size" , size , epochSecs , dbTag , tag );
70
+ reporter .gaugeWithTimestamp ("datasource .pool.size" , size , epochSecs , dbTag , tag );
71
71
72
72
long meanAcquireMicros = status .meanAcquireNanos () / 1000 ;
73
- reporter .gaugeWithTimestamp ("db .pool.meanAcquireMicros" , meanAcquireMicros , epochSecs , dbTag , tag );
73
+ reporter .gaugeWithTimestamp ("datasource .pool.meanAcquireMicros" , meanAcquireMicros , epochSecs , dbTag , tag );
74
74
75
- reporter .gaugeWithTimestamp ("db .pool.usageCount" , status .hitCount (), epochSecs , dbTag , tag );
76
- reporter .gaugeWithTimestamp ("db .pool.acquireMicros" , status .totalAcquireMicros (), epochSecs , dbTag , tag );
75
+ reporter .gaugeWithTimestamp ("datasource .pool.usageCount" , status .hitCount (), epochSecs , dbTag , tag );
76
+ reporter .gaugeWithTimestamp ("datasource .pool.acquireMicros" , status .totalAcquireMicros (), epochSecs , dbTag , tag );
77
77
int waitCount = status .waitCount ();
78
78
if (waitCount > 0 ) {
79
- reporter .gaugeWithTimestamp ("db .pool.waitCount" , waitCount , epochSecs , dbTag , tag );
79
+ reporter .gaugeWithTimestamp ("datasource .pool.waitCount" , waitCount , epochSecs , dbTag , tag );
80
80
}
81
81
long waitMicros = status .totalWaitMicros ();
82
82
if (waitMicros > 0 ) {
83
- reporter .gaugeWithTimestamp ("db .pool.waitMicros" , waitMicros , epochSecs , dbTag , tag );
83
+ reporter .gaugeWithTimestamp ("datasource .pool.waitMicros" , waitMicros , epochSecs , dbTag , tag );
84
84
}
85
85
}
86
86
@@ -97,27 +97,27 @@ private void report() {
97
97
}
98
98
99
99
private void reportCountMetric (MetaCountMetric countMetric ) {
100
- reporter .count (nm ("db .count." , countMetric .name ()), countMetric .count (), dbTag );
100
+ reporter .count (nm ("ebean .count." , countMetric .name ()), countMetric .count (), dbTag );
101
101
}
102
102
103
103
private void reportTimedMetric (MetaTimedMetric metric ) {
104
104
final String name = metric .name ();
105
105
if (name .startsWith ("txn." )) {
106
- reportMetric (metric , "db .txn" , dbTag , "name :" + qry (name ));
106
+ reportMetric (metric , "ebean .txn" , dbTag , "label :" + qry (name ));
107
107
} else {
108
- reportMetric (metric , nm ("db .timed." , name ), dbTag );
108
+ reportMetric (metric , nm ("ebean .timed." , name ), dbTag );
109
109
}
110
110
}
111
111
112
112
private void reportQueryMetric (MetaQueryMetric metric ) {
113
113
final var name = metric .name ();
114
- final var queryTag = "name :" + qry (name );
114
+ final var queryTag = "label :" + qry (name );
115
115
if (name .startsWith ("orm" )) {
116
- reportMetric (metric , "db .query" , dbTag , "type:orm" , queryTag );
116
+ reportMetric (metric , "ebean .query" , dbTag , "type:orm" , queryTag );
117
117
} else if (name .startsWith ("sql" )) {
118
- reportMetric (metric , "db .query" , dbTag , "type:sql" , queryTag );
118
+ reportMetric (metric , "ebean .query" , dbTag , "type:sql" , queryTag );
119
119
} else {
120
- reportMetric (metric , "db .query" , dbTag , "type:other" , queryTag );
120
+ reportMetric (metric , "ebean .query" , dbTag , "type:other" , queryTag );
121
121
}
122
122
}
123
123
0 commit comments