If you continue with this, at least ensure you properly follow the rate limit headers it returns. At a large scale, having nothing to ensure you’re within the rate limit across all servers, it will be abusing their API.
Yes I understand your concerns, I know how not to go over the limits as errors will be on all servers, I will only need one server to log any errors. And do not go into how it wont be easy, I know how to do it, and will not implement the system unless the system works. Then all I have to do is follow the rate limits on one server
One main problem: If you have multiple servers on(game getting popular), you will hit the limit for sure unless you somehow find a solution of reading values globally across all servers(cross-server values).
Yes, but at least if you implement a check and stop sending requests if you have to wait for the rate limit to pass, it won’t seem like you’re just ignoring the rate limit. That’s what Discord really hates.
I should also add, if you have an error that doesn’t stop the entire script and happens often, if you have many servers and this goes on for a long time, you will be constantly pushing that rate limit, even if you stop sending requests when you hit it. This will also get you in trouble.
I will have it so that on server’s start, it will attempt to read a data store value, if the value is false, then it will set it to true and be the log server, if other servers try to read the value and its true, then the server will disable the error logging code. And if Roblox data stores deny the request because another server called it within 6 seconds, then it doesent matter, its probably already assigned. This system wont be perfect, but it should get the job done. If you know a better way please tell.
Instead of using Discord to log your errors, why not use Sentry? Sentry.io logs your errors and avoids duplicates. You can set up a Sentry webhook to send POST requests to your Discord webhook.
I will look at it. Thank you. But I really only plan on logging core system failures, and only logging those on server stops or when I have a que of errors and warnings reaching the limit of 2000 characters, which means I’m going to pack as much as I can all into one message
Having a specific server sending the logs doesn’t really prevent rate limit abuse, it would only lighten the load very little. And, if you aren’t using MessagingService to send errors from other servers, you would be only getting errors from that log server, which doesn’t help if something happens in another server that hasn’t happened in the log one.
It’s more work, but if you’re looking for thorough error logging, Sentry is the best way to go about it. Discord is not only disorganized, but you’re also in a gray area in the ToS
If I’m getting so many core errors that I’m sending massive messages with tons of errors more then the rate limit, the game will most definitely be unplayable, but I’m still going to get discord rate limits to be safe
Not always. Stack trace are also very important, so having a maximum of 2000 characters would probably only catch a few errors at best, and that’s assuming the stack traces are short.
There are errors that don’t stop the entire script that can be spammed. (Events, usually)
Yes, yes, I know, I have a way (QUE!)
Alright, seems you got the situation under control then! Good luck on your system.
Thank you, and thanks for your concerns
I don’t recommend that you have errors log to Discord because errors can be unpredictable and come and enormous rates, which could cause lots of webhooks to your server, and Discord may punish you for that.
Please read everything before saying something that has already been discussed
I highly discourage the use of Discord webhooks to track errors. This is against their Terms of Service, and you will receive a warning email from their staff stating that if it continues, it will lead to the removal of the webhook and a possible account termination. For more information, read this post on the DevForum!
A lot of genuine recommendations are being ignored here, so I’d just like to make a bit of a decisive statement. This thread has been pretty long dragged out.
-
Logging errors on Discord is not permitted. Period. There are repercussions for those who can’t follow simple policies. OP has been made aware of this and chooses not to take the recommendation, so they can also be the one to take responsibility for their own misuse of Discord when moderation acts. Don’t bring it up anymore. They’ve heard it enough.
-
Bypassing the Terms of Service via a queue or by limiting how much you send does not change anything. If anything, bypassing restrictions by being pseudosecretive about your methods is worse off for your own reputation with their staff.
-
Discord itself is plain bad for error logging, regardless of whether it’s against the rules or not. It’s honestly not a very effective solution. I’ve seen such logs before and channels end up cluttered or a disorganised mess, among other things.
OP is free to do as they please so long as they recognise the risks of their failure to follow policies and what’s coming for them for that irresponsibility. The rest of you coming across this thread should not follow suit.
There are very unique and dedicated error logging and diagnosis tools that also help you further understand issues in your games. Sentry is a fairly big one that’s been brought up.
I wouldn’t recommend you use Discord to log errors. If you start hitting rate limits it could lead to moderation action taken against your Discord account.
I haven’t looked into it a bunch, though you may want to check out Sentry. It’s a service made for error tracking and you’ll be able to receive notifications via SMS, email, etc… Definitely something to consider if you don’t want to risk losing your Discord account.
I am now using sentry, thank you everyone for your recommendations.
I know it’s been a long time but anyways. Even though you can use sentry, a lot of people still rely on discord for logging stuff, generally product purchase, command logs and some other stuff. I don’t see a problem using discord for logging given you can manage how many webhooks you’ve sent through scripts. I’ve been using webhooks for a while now, and the reason of why it still works is because I have rate limits within every logging channel. If I’m not mistaken they allow up to 30 requests per minute/channel, so basically we could make a queue module dedicated for that stuff, that’s what I did, if I want to send a webhook, it’d check the interval (2 seconds within requests) and then send the webhook after that interval, so 30 webhooks would be 30 * 2 seconds = 60 seconds/1 minute. If there were a spam, the module would handle how to deal with it itself (at least that’s what mine does) so sending webhooks while you’re doing it legally shouldn’t be a problem at all.