Slack Attachment Width and Wrapping Issues
Asked Answered
R

1

31

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?

Redneck answered 26/7, 2016 at 16:33 Comment(4)
i'm having the same problem. have you tried using /feedback and pointing them to your question here?Brainstorm
We hit the same thing. Putting the log lines inside triple backticks helped with readability but did not address the width and wrapping.Apochromatic
Anything new ? My attachments are being truncated as well and there is no "show more" :SEstis
Yeah this sucks! I need to have properly formatted stack traces and this wrapping makes this useless.Carmoncarmona
J
3

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

Journalese answered 10/9, 2017 at 17:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.