infologs.springrts.com - Page 2

infologs.springrts.com

Discuss development of lobby clients, server, autohosts and auto-download software.

Moderators: Moderators, Lobby Developers

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: infologs.springrts.com

Post by gajop » 16 Mar 2015, 07:08

Funkencool wrote:@Jools, I'm guessing gajop is (maybe?) thinking about writing some lua that would upload the infologs; but first, he wants to know if there is a service that exists to upload them to.
Whether or not that's the case, you're focusing on the wrong aspect.
That.
Funkencool wrote: Maybe this 'code' could upload to pastebin and just attach the link to the replay site somehow for temporary viewing? Then there wouldn't be countless unneeded logs.
That's possible as well, but *some* Spring service needs to receive links to infologs so it can parse it, therefor some kind of API is needed.
Jools wrote:That's what I meant by integrating it in game or lobby (or engine).
That's what I want to do too.
Silentwings wrote:They can be sent using a widget, but thats not great since if Spring crashes I can't see a way to guarantee that the stacktrace is sent by the widget after the crash occurs.
Agreed. For crashes widgets are probably unusable. That said, I also want to report non-crashing Lua errors. Even reporting usage statistics (e.g. hardware specs/opengl output) can be useful.
Silentwings wrote: So probably it has to be sent from the lobby client (automatically or at request of user) and then the replay site would have to do some kind of sorting to match them onto games.
Lobby client or anything that launches Spring really. I can imagine that Spring (or a Spring game) could one day come with a process that is launched simultanesouly with it and is used to handle errors. But I digress, (non-Lua) lobby clients are probably the thing that would handle Spring crashes.

@Privacy:
This is certainly a thing to consider. On the client side, the user can be asked a couple of questions such as: "Report usage statistics?", "Report this error that just happened and may have caused a loss in functionality?". Anonymizing can be done on either the client or the server side. The server could have only some infologs be public and others available just to the developers (engine+game).

PS: I've noticed from FA's screens that weblobby has a weblobby.log. I guess most lobbies have their own logs, so some kind of reporting there wouldn't be bad to have. (Same applies for AIs). Maybe this should really be a separate service from the replay site that is integrated with it?
0 x

dansan
Server Owner & Developer
Posts: 1191
Joined: 29 May 2010, 23:40

Re: infologs.springrts.com

Post by dansan » 16 Mar 2015, 08:51

Silentwings wrote:... the upload script runs on the host, which is typically Spring dedicated (and so doesn't even execute the simulation & can't provide a useful infolog). What would be most useful for debugging purposes would be infologs from users; they are also the only record of errors from users unsynced code.
Oh - from the user, not the autohost... that makes sense :D

Yeah - then I see the privacy problem. But IMO the infolog should not be sanitized of paths etc, because those could be the source of problems too and are often important for communication with the user. IMO there is no reason for the infologs to be public at all. Access should be limited to known game and engine devs. That is also what you expect from other software, when it wants to send reports home. I suggest that lobbies present the user with the content of the message, and ask the user to consent.

If you want to make a connection to the replay site or not is not an issue. The infolog contains the gameid. The upload service can simply construct the URL of a link like this: http://replays.springrts.com/replay/<gameID>/ and a simple HTTP-GET would tell it if the replay exists.
0 x

dansan
Server Owner & Developer
Posts: 1191
Joined: 29 May 2010, 23:40

Re: infologs.springrts.com

Post by dansan » 16 Mar 2015, 09:11

Oh well... If if you wish, I can just add an infolog upload feature to the replay site.

I think it makes sense from the point of work and comm with the users: Users see the replay-URL in the lobby chat window after each match. Authentication is already there, engine+game devs can simply login with a lobby account they PM me and have access to the infologs. If the uploading user is supplied, then she can have access to her infolog too (for transparency / communication purposes). Infologs would be listed on the relevant replay page (if one exists) and on a separate page for those infologs w/o a replay page and browsing/sorting/searching.

Analysis code must be supplied by someone else. It would be called with the infolog text and available upload-info and would store its result into the DB (Django ORM is really simple to use) or return something like JSON and I'd store it.

Please state all requirements for such a infolog upload service.
0 x

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: infologs.springrts.com

Post by gajop » 16 Mar 2015, 16:43

dansan wrote:Oh well... If if you wish, I can just add an infolog upload feature to the replay site.
<3
dansan wrote:Please state all requirements for such a infolog upload service.
Uploads should include:
- infolog.txt
- freeform text the user may write
- name of the tool that did the upload

Regarding the webservice, the simpler the better as far as I'm concerned since I want to implement this in chililobby. JSON over XML. For me JSONRPC would be ideal if it can be made to use TCP sockets, but I understand if you chose something else (just try to avoid bloated stuff like SOAP). REST is also OK, although I'll have to figure out how to create HTTP for Lua ;)

Regarding the website, I'll leave that up to you, but some things are:
- Viewing, searching and browsing for infologs based on game/engine versions, severity (parsed infologs), as well as having links to replays.
- Commenting on infologs + linking with Github/issue systems (simple HTML links are enough to start with)
- Notification system for devs (and maybe players if their infologs have been commented on)
- Authentication service that confirms the authenticity of usernames in infologs (just extra base64(md5(pw)) maybe?)
- Manual uploads

Feel free to have artistic creativity of course ;)
0 x

dansan
Server Owner & Developer
Posts: 1191
Joined: 29 May 2010, 23:40

Re: infologs.springrts.com

Post by dansan » 16 Mar 2015, 17:32

OK - I'll create a separate Github project for this. JSON-RPC it is.
gajop wrote:- Authentication service that confirms the authenticity of usernames in infologs (just extra base64(md5(pw)) maybe?)
I don't understand this. Afaik the pw is not in the infolog. The usernames can be confirmed with the replay file from the autohost (which is on the replay page).
Or did you mean, that the uploader should be authenticated? I would actually really like to have this, because for all other uploads authentication is also needed, and that makes troll/spam harder. Lobbies can simply use the stored username/password they used to start the match.
0 x

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: infologs.springrts.com

Post by gajop » 16 Mar 2015, 18:01

dansan wrote:Or did you mean, that the uploader should be authenticated? I would actually really like to have this, because for all other uploads authentication is also needed, and that makes troll/spam harder. Lobbies can simply use the stored username/password they used to start the match.
Correct. The great thing is that you can use it for manual uploads too ;)
Authenticating also implies that we can do user notifications (if they have emails) if their infologs get responded by the devs. Kinda like poor man's support tickets.

That said, I'd like it if jsonrpc had the following commands:
upload(infolog+freetext+user/pw+issupportticket+etc.)->infolog id
listupdates(user/pw)->{updates}
listopentickets(user/pw)->{tickets} (list of infolog ids that have issupportticket = true)

This is just a sketch of course. Basically what I want to do with infologs is the following:
1. Allow a simple, automated way of uploading infologs and associating them with users and battles (replays) if possible
2. Have it easily accessible to game and engine devs
3. With 1. + 2. combined, have a simple automated error reporting and usage statistics tool that requires no manual intervention from either side (user still gives consent for uploads)
(optional) 4. Extend it to a simple error reporting tool by non power users by allowing people to track/get notified if their errors get resolved (users would explicitly ask for resolution when they submit their errors). On the lobby client side, these wouldn't be done from automatically detected errors, but rather if a user explicitly clicks on the "Report error" buttons.
0 x

dansan
Server Owner & Developer
Posts: 1191
Joined: 29 May 2010, 23:40

Re: infologs.springrts.com

Post by dansan » 19 Mar 2015, 15:53

#1 json-rpc upload service

Uploads should
  • be authenticated
  • optionally trigger an email to inform game dev if it is marked as supportticket -> #2
  • be analyzed -> #3
include:
  • infolog.txt
  • freeform text the user may write
  • name of the tool that did the upload
suggested function signature:

Code: Select all

def upload(
  username, # str, lobby account
  pw, # str, lobby account
  infolog, # b64(str), infolog.txt
  client, # str, name of the connecting client software
  freetext="", # b64(str), optional, user text
  issupportticket=False, # bool, optional, user thinks this is a support case
  dict(extensions)={} # dict, optional, additional fields w/o changing API
)
return infolog_id # int, reference for this entry

#2 inform game dev about supportticket

Trigger an email to inform game dev if upload was marked as support ticket.

#3 Analyze infolog

Minimal analysis is done during upload to link infolog to replay.

Further analysis code must be supplied by someone else. It would be called with the infolog text and available upload-info and would store its result into the DB (Django ORM is really simple to use) or return something like JSON and I'd store it.

Maybe resurrect https://github.com/spring/spring-infolog?

#4 Ticket system

Simple error reporting tool for non power users by allowing people to track/get notified if their errors get resolved (users would explicitly ask for resolution when they submit their errors). -> #5 #7 #8 #9
On the lobby client side, these wouldn't be done from automatically detected errors, but rather if a user explicitly clicks on the "Report error" buttons.

Suggested function signatures:

Code: Select all

listupdates(user/pw)->{updates}
listopentickets(user/pw)->{tickets} (list of infolog ids that have issupportticket = true)
#5 search and browse infologs

Allowed only for devs.
  • by game/engine version
  • by severity (parsed infologs)
  • by date
  • full text search in infolog
  • full text search in comments
#6 Display infolog

Visible only to the user that uploaded the infolog and devs.
  • match and upload dates
  • uploader
  • link to replay
  • comments
  • linking with Github/issue systems (simple HTML links are enough to start with)

#7 Manual uploads

Web form of upload function.

#8 User notification

If user has supplied email, and its infolog gets responded by the devs.

#9 Add infologs to replay page

Visible only to user that uploaded infolog(s) and devs.
  • in collapsed box
  • list comments
  • comment form
#10 Add infologs to player page
  • Simple list page with table: date, game, links to infolog and replay, comment count
  • Add link to top-right user menu.
0 x

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: infologs.springrts.com

Post by gajop » 19 Mar 2015, 16:52

You are fucking awesome. :D
0 x

User avatar
danil_kalina
Posts: 505
Joined: 08 Feb 2010, 22:21

Re: infologs.springrts.com

Post by danil_kalina » 19 Mar 2015, 17:21

gajop wrote:You are fucking awesome. :D
somebody! make cruel FELONY for that guy!
0 x

dansan
Server Owner & Developer
Posts: 1191
Joined: 29 May 2010, 23:40

Re: infologs.springrts.com

Post by dansan » 22 Jun 2015, 22:34

So uhm... some months and a new job later... I have decided, that there is enough code to start the thing, even if it is by no means finished.
  • #1 json-rpc upload service
  • Uploads should be authenticated
  • optionally trigger an email to inform game dev if it is marked as supportticket -> #2 → TODO
  • be analyzed -> #3 → My part is done (for now), you can hack away on the infolog analyser code. Please state all requirements you have for that in #3 or new issues.
  • function signature → https://github.com/dansan/infolog-uploa ... ews.py#L54
  • #4 Ticket system API for (lobby) clients listupdates(user/pw)->{updates}, listopentickets(user/pw)->{tickets} → TODO
  • Simple error reporting tool for non power users by allowing people to track/get notified if their errors get resolved (users would explicitly ask for resolution when they submit their errors). -> #5 #6 #7 #8 #9 #10
  • #5 search and browse infologs → search TODO, browse done
  • #6 Display infolog Visible only to the user that uploaded the infolog and devs.
  • #7 Manual uploads Web form of upload function.
  • #8 User notification If user has supplied email, and its infolog gets responded by the devs. → TODO
  • #9 Add infologs to replay page Visible only to user that uploaded infolog(s) and devs.
    #10 Add infologs to player page Simple list page with table: date, game, links to infolog and replay, comment count
  • Add link to top-right user menu.
0 x

dansan
Server Owner & Developer
Posts: 1191
Joined: 29 May 2010, 23:40

Re: infologs.springrts.com

Post by dansan » 22 Jun 2015, 23:39

Content & engine devs that wish to access uploaded infologs must send me a PM with their lobby username(s). Their user(s) at the replay site will then be marked as "developer" and will get access to http://replays.springrts.com/infolog/ (list of all infologs) and see the infologs at the replay and player pages.

The infolog-view and infolog-listings at the replay and player pages are only accessible by developers and the uploader (a user). The idea is that the devs can communicate through this with the user. The user will be notified about changes (comments etc) (TODO).

In the infolog-view (http://replays.springrts.com/infolog/show/3/) tags, an "external link" (mantis/trac) can be added/edited/removed and devs can "subscribe" to the infolog. In the future subscribed devs will be sent a notice if something regarding that infolog is changed (TODO).

To upload an infolog to the replay site use the "Upload" drop-down in the top menu or JSON-RPC (function signature):

Code: Select all

import base64
from jsonrpc.proxy import ServiceProxy

lobby_username = "Dansan"
lobby_password = "s3cr3t"
url = "http://replays.springrts.com/infolog/json/"
iltxt = base64.b64encode(open("infolog.txt", "rb").read())
client_app = "test upload"
user_msg = base64.b64encode("PEBCAK")
is_support_ticket = False
extensions = {}

sp = ServiceProxy(url)
sp.upload_json(lobby_username, lobby_password, iltxt, client_app, user_msg, is_support_ticket , extensions)
→ {u'error': None,
→  u'id': u'cd3e9faa-1922-11e5-9cdb-f0def160f27c',
→  u'jsonrpc': u'1.0',
→  u'result': {u'id': 3,
→   u'msg': u'Success.',
→   u'status': 0,
→   u'url': u'/infolog/show/3/'}}
After the (web or json-rpc) upload a minimal analysis is done, so that the replay can be associated. Further analysis is up to you → #3.
0 x

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: infologs.springrts.com

Post by gajop » 22 May 2016, 06:40

I'm bumping this thread since someone asked in chat and seems they didn't know about it:
[13:24:39] <MadrMan> hrm, i was thinking about automatic infolog uploading: what if the gamesetup/script.txt could contain urls to upload infologs to at the end of the game/on crash? (if they contain errors)
[13:24:39] <MadrMan> mods could add their own url in that case
0 x

hokomoko
Spring Developer
Posts: 581
Joined: 02 Jun 2014, 00:46

Re: infologs.springrts.com

Post by hokomoko » 22 May 2016, 20:12

I'm not too fond of automatic infolog uploading since it contains personal information (username, paths etc.) and we don't have a good mechanism for asking permission.
It may be possible to make a lua script which only uploads the stack trace in a case of a crash (note that in most crashes the shutdown calls are called correctly so lua should be able to do this), but even that is a bit problematic without asking for express consent.

I do however think it would be nice to store the infolog in the local replay, so we can get infologs even after the engine was started again.
0 x

User avatar
Silentwings
Moderator
Posts: 3586
Joined: 25 Oct 2008, 00:23

Re: infologs.springrts.com

Post by Silentwings » 22 May 2016, 20:19

+1

Saving a suitably named copy of the infolog into the replays dir would make it more easily accessible than having it stored inside the replay file.
0 x

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: infologs.springrts.com

Post by gajop » 23 May 2016, 07:42

I'm not too fond of automatic infolog uploading since it contains personal information (username, paths etc.) and we don't have a good mechanism for asking permission.
We could ask for permission then. I have played games that would spawn a window that allows you to send bug reports when the games crash, so it's certainly possible to do it. What might be difficult is doing that by completely relying on Spring and no external UI system.
Saving a suitably named copy of the infolog into the replays dir would make it more easily accessible than having it stored inside the replay file.
+1
Replays should be identical for all players, and it's much easier to parse the infolog file if it's separate.
0 x

User avatar
Jools
XTA Developer
Posts: 2804
Joined: 23 Feb 2009, 16:29

Re: infologs.springrts.com

Post by Jools » 23 May 2016, 14:05

gajop wrote:
Saving a suitably named copy of the infolog into the replays dir would make it more easily accessible than having it stored inside the replay file.
+1
Replays should be identical for all players, and it's much easier to parse the infolog file if it's separate.
Replays are already different on different local hosts: the replay contains synced and also local unsynced communication , but not remote unsynced communication. Still, I feel that incorporating infologs in the replay might be like asking for trouble. And that other argument also sounds valid.
0 x

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: infologs.springrts.com

Post by gajop » 23 May 2016, 16:53

I stand corrected, sorry.
0 x

hokomoko
Spring Developer
Posts: 581
Joined: 02 Jun 2014, 00:46

Re: infologs.springrts.com

Post by hokomoko » 23 May 2016, 17:05

replay contains remote unsynced communication -> you can see mouse cursor and lock camera in a replay.
0 x

User avatar
Jools
XTA Developer
Posts: 2804
Joined: 23 Feb 2009, 16:29

Re: infologs.springrts.com

Post by Jools » 23 May 2016, 18:09

hokomoko wrote:replay contains remote unsynced communication -> you can see mouse cursor and lock camera in a replay.
Isn't that because it has been sent to local host by the lockcamera gadget/widget code?
0 x

hokomoko
Spring Developer
Posts: 581
Joined: 02 Jun 2014, 00:46

Re: infologs.springrts.com

Post by hokomoko » 23 May 2016, 18:18

yes, that's what "remote unsynced communication" means.
0 x

Post Reply

Return to “Lobby Clients & Server”

cron