discord.py-ext-prometheus icon indicating copy to clipboard operation
discord.py-ext-prometheus copied to clipboard

Question

Open xMrAfonso opened this issue 2 years ago • 2 comments

Hey there, so, I am porting this to java and I wanted to ask what exactly is the "interaction" in ON_INTERACTION_COUNTER? Command is probably the name of the command but what is the interaction, what is the data it has? What exactly is ['shard', 'interaction', 'command'] since I am don't really know Python, are those variables or actually just strings?

xMrAfonso avatar Aug 07 '23 23:08 xMrAfonso

By ON_INTERACTION_COUNTER I think you mean discord_event_on_interaction.

discord_event_on_interaction counts all the application interactions. All interaction type are listed on the documentation over here. command will be none unless the interaction was a slash command.

As for a shard, this is more relevant in bigger bots as each shard can only support a maximum of 2500 servers. When a bot is sharded, it allows itself to split the workload across multiple shards.

And for the question "What exactly is ['shard', 'interaction', 'command']". These are labels for the metric, you might want to look more into PromQL to understand them better.

I hope this helps :)

Apollo-Roboto avatar Aug 08 '23 00:08 Apollo-Roboto

I am a bit confused, since it does track commands right? like how many times X command was used compared to Y, correct? So, where do you provide those?

xMrAfonso avatar Aug 08 '23 19:08 xMrAfonso