26

I'm trying to use slack attachments to log application errors but the large fields like the stack trace are behaving weirdly.

First, when using attachments the table seems to be fixed to some arbitrary width, is there anyway to change this so a wider value can be allowed? Otherwise 50+% of the slack window is blank, a complete waste. enter image description here

Using just text works fine, but there are a number of other smaller fields included that benefit from the field format.

Also I'm having a problem with slack doing strange wrapping when the message is large. Below is just a small snippet with a few characters falling off, but on the full stack there can be substantial loss.

Example (slack message builder) enter image description here

Adding a single character to the string and now it starts chopping things off (the text is all there and selectable, it's just doing a terrible job at wrapping.)

Example 2 enter image description here

Anyone have any suggestions to get something even slightly more useful?

Erik Kalkoken
  • 23,798
  • 6
  • 53
  • 81
Wrightboy
  • 766
  • 10
  • 23

1 Answers1

1

I would suggest to upload the application errors as text file (Plain Text Snippet) instead putting the info into a message. That way you can post more data and the formatting is also better suited for this kind of data.

You can auto-share your uploaded file in a channel and it will appear as new message. You can also add comments to is if you want to convey more information.

Use the files.upload method to upload your error text as file with the filetype set to text to get a text snippet.

Here is an example how it looks like on Slack, when an app posts a new text snippet as described: Example for text snippet on Slack

Erik Kalkoken
  • 23,798
  • 6
  • 53
  • 81