-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
New SlackWebookHandler and long context/extras problem #909
Comments
After debugging this, I can tell there is limitation somewhere around 2000 symbols for each attachment imposed by slack itself. Any ideas how to handle this? |
AFAIK there are no limits when using the normal |
Maybe you could truncate the output by hand to make sure the backticks is present at the end, or at least report it to slack so that they fix their truncation to not rip apart a code block.. |
@Seldaek I hope by you, you mean me - the user of the library. Then - yes, I could, I already do that since I found out about the limitation. I didn't have time to look into it but I'll get around to reporting it someday ;) |
@mirfilip By you I mean anyone running into this issue that feels like fixing it in monolog, or in slack :) |
Because I had to deal with the same issue I have created this package. You can find it also in wiki of monolog. |
Hi,
I just got around to test the new cool SlackWebhookHandler. It works nice and fixes problems I had before, there is however one annoyance I found. @an1zhegorodov I didn't want to continue discussion in your original PR though.
I use attachments and include context and extra data. Depending on the length of the context, it's either formatted well or cut:
Looking good:
the whole nested array is displayed in code block (using "```").
If I, however, make it bigger:
The context output is truncated and the whole code block is broken. Below, it's how it looks like at the beginning of the msg (I don't include full msg cause it's big):
You can see at the beginning that there is no closing "```" of code block (probably because truncation). I don't have time to debug this now, it could be as well a limitation of Slack Webhook formatting.
What I'm trying to do:
I want to include a stacktrace (not based on exception) in a context so that it's prettified and displayed in code block on Slack. The
NormalizerFormatter
and "stringification" get the job done, but only for small contexts.The text was updated successfully, but these errors were encountered: