Warning and Error Logging system

As Operatik said, it’s not wise to use Discord webhooks for error reporting. My team uses Sentry, which is a service entirely dedicated to error reporting. I can’t help with the network code because it’s not my area of expertise, but I figured I’d give you the option.

cc @tomgie

Yeah, if your error logging gets recognized, you will be banned from Discord.

and for your concerns about overloading discord, this system will not run in studio.

Yeah, and when you have an error and multiple servers, you will be spamming that webhook. There are much better solutions that don’t risk your Discord account and provide better resources with analytics on what’s happening.

(I just realized I replied to the wrong person… sorry! This is meant for OP)

1 Like

Discord is not an error logging service and your account will be disabled for using it as such.

Use GoogleAnalytics, GameAnalytics, Sentry or one of the many alternatives.

3 Likes

I have not seen anything about not being allowed to use discord web hooks for error logging, did you mean you think I will go over discords web hook limits? I have not been able to find anything about allowed use cases for discord web hooks.

Discord previously blocked requests directly to their API from a Roblox server, as seen here: x.com

There were proxies provided that helped limit the abuse of Discord’s API, and eventually Discord let up on it because people still wanted it for other uses. It is still a violation of their ToS.

I would like to kindly suggest you heed the previous posts warnings about using Discord for logging errors and warnings as it has already been officially stated by roblox if you do use discord as your error logging container, you will be disabled.
image
Also, we do not want a repeat of the ban.

2 Likes

Yes, but that is just about the API limits, not about a certain use case

1 Like

Please understand this that your Discord account will be in the risk zone of being disabled when violating the ToS as previously mentioned by replies above.

1 Like

If you create a game and it gets popular, you are certainly going to hit the discord call limit. Even though you seem to not care about getting banned or care about what we say, I still recommend that you go with something such as Sentry. Sentry has the benefit of also organizing your games and the errors it receives. Plus it’s free for a specific number of requests.

3 Likes

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.

2 Likes

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

1 Like

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

2 Likes

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.

2 Likes

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.

1 Like

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.

3 Likes

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

1 Like

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

1 Like

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

1 Like

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)

1 Like

Yes, yes, I know, I have a way (QUE!)

2 Likes