hunter/worker: add hunter_requests gauges for stream_open_token
This commit is contained in:
parent
50d9795e6e
commit
0a3508087e
|
@ -306,7 +306,9 @@ async fn open_stream(
|
||||||
.expect("db.get_token()");
|
.expect("db.get_token()");
|
||||||
if let Some(token) = &token {
|
if let Some(token) = &token {
|
||||||
let url = format!("https://{}/api/v1/streaming/public?access_token={}", host, urlencoding::encode(token));
|
let url = format!("https://{}/api/v1/streaming/public?access_token={}", host, urlencoding::encode(token));
|
||||||
|
metrics::increment_gauge!("hunter_requests", 1.0, "type" => "stream_open_token");
|
||||||
stream = Feed::stream(client, &url).await;
|
stream = Feed::stream(client, &url).await;
|
||||||
|
metrics::decrement_gauge!("hunter_requests", 1.0, "type" => "stream_open_token");
|
||||||
} else {
|
} else {
|
||||||
tracing::info!("No working token for {}", host);
|
tracing::info!("No working token for {}", host);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user