Apollo-Roboto / discord.py-ext-prometheus

Add Prometheus to your Discord bot with this handy extension
https://pypi.org/project/discord-ext-prometheus/
MIT License
15 stars 5 forks source link

Question #7

Open xMrAfonso opened 11 months ago

xMrAfonso commented 11 months ago

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?

Apollo-Roboto commented 11 months ago

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 :)

xMrAfonso commented 11 months ago

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?