Skip to content

Commit 89c5441

Browse files
committed
fix: add metrics_identifier to new endpoints
1 parent 8655c88 commit 89c5441

File tree

5 files changed

+20
-0
lines changed

5 files changed

+20
-0
lines changed

stackslib/src/net/api/getblock_v3.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ impl HttpRequest for RPCNakamotoBlockRequestHandler {
155155

156156
Ok(HttpRequestContents::new().query_string(query))
157157
}
158+
159+
fn metrics_identifier(&self) -> &str {
160+
"/v3/blocks/:block_id"
161+
}
158162
}
159163

160164
impl RPCRequestHandler for RPCNakamotoBlockRequestHandler {

stackslib/src/net/api/getstackers.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ impl HttpRequest for GetStackersRequestHandler {
126126

127127
Ok(HttpRequestContents::new().query_string(query))
128128
}
129+
130+
fn metrics_identifier(&self) -> &str {
131+
"/v2/stacker_set/:cycle_num"
132+
}
129133
}
130134

131135
impl RPCRequestHandler for GetStackersRequestHandler {

stackslib/src/net/api/gettenure.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ impl HttpRequest for RPCNakamotoTenureRequestHandler {
195195

196196
Ok(req_contents)
197197
}
198+
199+
fn metrics_identifier(&self) -> &str {
200+
"/v3/tenures/:block_id"
201+
}
198202
}
199203

200204
impl RPCRequestHandler for RPCNakamotoTenureRequestHandler {

stackslib/src/net/api/gettenureinfo.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ impl HttpRequest for RPCNakamotoTenureInfoRequestHandler {
9797
}
9898
Ok(HttpRequestContents::new().query_string(query))
9999
}
100+
101+
fn metrics_identifier(&self) -> &str {
102+
"/v3/tenures/info"
103+
}
100104
}
101105

102106
impl RPCRequestHandler for RPCNakamotoTenureInfoRequestHandler {

stackslib/src/net/api/postblock_proposal.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,10 @@ impl HttpRequest for RPCBlockProposalRequestHandler {
424424
self.block_proposal = Some(block_proposal);
425425
Ok(HttpRequestContents::new().query_string(query))
426426
}
427+
428+
fn metrics_identifier(&self) -> &str {
429+
"/v2/block_proposal"
430+
}
427431
}
428432

429433
struct ProposalThreadInfo {

0 commit comments

Comments
 (0)