Remove a lot of track details from metrics because prometheus don't like
parent
48bf81b2a3
commit
4f697e2a90
|
@ -29,11 +29,8 @@ lazy_static! {
|
||||||
"Total number of servers with Spoticord in a voice channel"
|
"Total number of servers with Spoticord in a voice channel"
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
static ref TRACKS_PLAYED: IntCounterVec = register_int_counter_vec!(
|
static ref TRACKS_PLAYED: IntCounterVec =
|
||||||
opts!("tracks_played", "Tracks Played"),
|
register_int_counter_vec!(opts!("tracks_played", "Tracks Played"), &["type"]).unwrap();
|
||||||
&["type", "name", "artists", "uri"]
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
static ref COMMANDS_EXECUTED: IntCounterVec = register_int_counter_vec!(
|
static ref COMMANDS_EXECUTED: IntCounterVec = register_int_counter_vec!(
|
||||||
opts!("commands_executed", "Commands Executed"),
|
opts!("commands_executed", "Commands Executed"),
|
||||||
&["command"]
|
&["command"]
|
||||||
|
@ -104,14 +101,7 @@ impl MetricsManager {
|
||||||
None => return,
|
None => return,
|
||||||
};
|
};
|
||||||
|
|
||||||
TRACKS_PLAYED
|
TRACKS_PLAYED.with_label_values(&[&track_type]).inc();
|
||||||
.with_label_values(&[
|
|
||||||
&track_type,
|
|
||||||
&track.get_name().expect("To have a name"),
|
|
||||||
&track.get_artists().expect("To have artists"),
|
|
||||||
&track.get_url().expect("To have a URL"),
|
|
||||||
])
|
|
||||||
.inc();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn command_exec(&self, command: &str) {
|
pub fn command_exec(&self, command: &str) {
|
||||||
|
|
Loading…
Reference in New Issue