Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate log errors #108

Open
dcastro opened this issue Sep 6, 2023 · 0 comments
Open

Investigate log errors #108

dcastro opened this issue Sep 6, 2023 · 0 comments
Milestone

Comments

@dcastro
Copy link
Member

dcastro commented Sep 6, 2023

Clarification and motivation

Some errors we found in the staging logs, we need to investigate whether these are actual errors (and open tickets to fix them), or events we should ignore, or downgrade from "error" to "warning".

[2023-09-08 15:51:24][TzBot.main][Error][diogo][PID 63317][ThreadId 15][tzbot-1.0-5sK58AN9Fpn5DZvT1ItOcu:TzBot.ProcessEvents src/TzBot/ProcessEvents.hs:114:7] Invalid message event/action, error "Error in $: expected edited message"
[2023-09-08 15:51:24][TzBot.main][Error][diogo][PID 63317][ThreadId 15][tzbot-1.0-5sK58AN9Fpn5DZvT1ItOcu:TzBot.ProcessEvents src/TzBot/ProcessEvents.hs:115:7] Full event object: {"channel":"C02N85E82LV","channel_type":"channel","event_ts":"1694188283.002300","hidden":true,"message":{"attachments":[{"fallback":"GitHub: GitHub: Let’s build from here","from_url":"http://www.github.com/","id":1,"image_bytes":309453,"image_height":630,"image_url":"https://github.githubassets.com/images/modules/site/social-cards/campaign-social.png","image_width":1200,"original_url":"http://www.github.com","service_icon":"https://github.com/favicon.ico","service_name":"GitHub","text":"GitHub is where over 100 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and fea...","title":"GitHub: Let’s build from here","title_link":"http://www.github.com/"}],"blocks":[{"block_id":"yLL","elements":[{"elements":[{"text":"Hello with link to ","type":"text"},{"text":"github.com","type":"link","unsafe":true,"url":"http://www.github.com"}],"type":"rich_text_section"}],"type":"rich_text"}],"client_msg_id":"679a7537-094f-42c3-b629-6d568feafc9e","team":"T02NDBHSWSG","text":"Hello with link to <http://www.github.com|github.com>","ts":"1694188279.128769","type":"message","user":"U02N85E78QM"},"previous_message":{"blocks":[{"block_id":"yLL","elements":[{"elements":[{"text":"Hello with link to ","type":"text"},{"text":"github.com","type":"link","unsafe":true,"url":"http://www.github.com"}],"type":"rich_text_section"}],"type":"rich_text"}],"client_msg_id":"679a7537-094f-42c3-b629-6d568feafc9e","team":"T02NDBHSWSG","text":"Hello with link to <http://www.github.com|github.com>","ts":"1694188279.128769","type":"message","user":"U02N85E78QM"},"subtype":"message_changed","ts":"1694188283.002300","type":"message"}

Unknown block types

Sep 06 16:46:45 tejat-prior tzbot-start[3253022]: [2023-09-06 16:46:45][TzBot.main.message][Warning][tejat-prior][PID 3253022][ThreadId 5][event_id:4f157b7a-1794-4fc1-aa24-896013a4f9d9][event_type:message][message_id:1694018804.258029][tzbot-1.0-LVFLUoOnjh5IWnKa9LirCj:TzBot.ProcessEvents.Common src/TzBot/ProcessEvents/Common.hs:105:9] Unknown level2 block types: [emoji]
Sep 07 11:21:12 tejat-prior tzbot-start[3253022]: [2023-09-07 11:21:12][TzBot.main.message][Warning][tejat-prior][PID 3253022][ThreadId 5][event_id:ec4a9f40-9479-447e-8f5a-e50ea61a2f47][event_type:message][message_id:1694085671.027869][tzbot-1.0-LVFLUoOnjh5IWnKa9LirCj:TzBot.ProcessEvents.Common src/TzBot/ProcessEvents/Common.hs:105:9] Unknown level2 block types: [user, link]
Sep 07 14:00:10 tejat-prior tzbot-start[3355520]: [2023-09-07 14:00:10][TzBot.main.message][Info][tejat-prior][PID 3355520][ThreadId 5][channel_id:C02ULJTDMB9][event_id:39737fdc-efe3-424d-bdd2-63e96dbcbef7][event_type:message][message_id:1694095210.337009][tzbot-1.0-LVFLUoOnjh5IWnKa9LirCj:TzBot.ProcessEvents.Message src/TzBot/ProcessEvents/Message.hs:47:5] Handling new message
Sep 07 14:00:10 tejat-prior tzbot-start[3355520]: [2023-09-07 14:00:10][TzBot.main.message][Warning][tejat-prior][PID 3355520][ThreadId 5][channel_id:C02ULJTDMB9][event_id:39737fdc-efe3-424d-bdd2-63e96dbcbef7][event_type:message][message_id:1694095210.337009][tzbot-1.0-LVFLUoOnjh5IWnKa9LirCj:TzBot.ProcessEvents.Common src/TzBot/ProcessEvents/Common.hs:110:9] Unknown level2 block types: [usergroup, emoji, emoji, user, link]

Message deleted events

[2023-09-08 10:26:26][TzBot.main][Error][diogo][PID 14467][ThreadId 15][tzbot-1.0-5sK58AN9Fpn5DZvT1ItOcu:TzBot.ProcessEvents src/TzBot/ProcessEvents.hs:109:7] Invalid message event/action, error "Error in $: key \"user\" not found"
[2023-09-08 10:26:26][TzBot.main][Error][diogo][PID 14467][ThreadId 15][tzbot-1.0-5sK58AN9Fpn5DZvT1ItOcu:TzBot.ProcessEvents src/TzBot/ProcessEvents.hs:110:7] Full event object: {"channel":"C02N85E82LV","channel_type":"channel","deleted_ts":"1694168739.832529","event_ts":"1694168785.000600","hidden":true,"previous_message":{"blocks":[{"block_id":"CRMkC","elements":[{"elements":[{"text":"Hey, let's meet at [10:30](","type":"text"},{"text":"www.google.com","type":"link","url":"http://www.google.com"},{"text":") tomorrow?!","type":"text"}],"type":"rich_text_section"}],"type":"rich_text"}],"client_msg_id":"8d869246-2bdb-49ec-9cca-9a57094a18fe","edited":{"ts":"1694168778.000000","user":"U02N85E78QM"},"team":"T02NDBHSWSG","text":"Hey, let's meet at [10:30](<http://www.google.com|www.google.com>) tomorrow?!","ts":"1694168739.832529","type":"message","user":"U02N85E78QM"},"subtype":"message_deleted","ts":"1694168785.000600","type":"message"}
@dcastro dcastro modified the milestones: v1.1, v1 Sep 7, 2023
dcastro added a commit that referenced this issue Sep 8, 2023
dcastro added a commit that referenced this issue Sep 8, 2023
dcastro added a commit that referenced this issue Sep 8, 2023
Problem: The server reports warnings whenever it finds a message with a
tag like `@user`. Since this occurs very often, it ends up flooding the
logs.

Solution: Don't report warnings for blocks of type `user`, `usergroup`
and `broadcast`.
dcastro added a commit that referenced this issue Sep 8, 2023
Problem: right now, when find an emoji block in a message, we split the
message in two. This means this message:

```
Hey, let's meet at 10:30 🕐 tomorrow?
```

Will be interpreted as two separate sentences, `["Hey, let's meet at
10:30", "tomorrow?"]`, and "tomorrow" won't be taken into account.

Solution: skip over emoji blocks, and collate adjacent text-like blocks.
This is not parsed as a single sentence `["Hey, let's meet at 10:30
tomorrow?"]`
dcastro added a commit that referenced this issue Sep 8, 2023
Problem: The server reports warnings whenever it finds a message with a
tag like `@user`. Since this occurs very often, it ends up flooding the
logs.

Solution: Don't report warnings for blocks of type `user`, `usergroup`
and `broadcast`.
dcastro added a commit that referenced this issue Sep 8, 2023
Problem: right now, when find an emoji block in a message, we split the
message in two. This means this message:

```
Hey, let's meet at 10:30 🕐 tomorrow?
```

Will be interpreted as two separate sentences, `["Hey, let's meet at
10:30", "tomorrow?"]`, and "tomorrow" won't be taken into account.

Solution: skip over emoji blocks, and collate adjacent text-like blocks.
This is now parsed as a single sentence `["Hey, let's meet at 10:30
tomorrow?"]`
dcastro added a commit that referenced this issue Sep 8, 2023
Problem: The server reports warnings whenever it finds a message with a
tag like `@user`. Since this occurs very often, it ends up flooding the
logs.

Solution: Don't report warnings for blocks of type `user`, `usergroup`
and `broadcast`.
dcastro added a commit that referenced this issue Sep 8, 2023
Problem: The server reports warnings whenever it finds a message with a
tag like `@user`. Since this occurs very often, it ends up flooding the
logs.

Solution: Don't report warnings for blocks of type `user`, `usergroup`
and `broadcast`.
dcastro added a commit that referenced this issue Sep 8, 2023
dcastro added a commit that referenced this issue Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant