# Why Kibana does his own weird formatting of my error.stack\_trace?

**URL:** <https://discuss.elastic.co/t/why-kibana-does-his-own-weird-formatting-of-my-error-stack-trace/371772>\
**Category:** Kibana\
**Created:** [December 10, 2024, 2:38pm UTC](https://discuss.elastic.co/t/why-kibana-does-his-own-weird-formatting-of-my-error-stack-trace/371772 "2024-12-10T14:38:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tristan107](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tristan107/32/139876_2.png) [@Tristan107](https://discuss.elastic.co/u/Tristan107)\
**Post date:** [December 10, 2024, 2:38pm UTC](https://discuss.elastic.co/t/why-kibana-does-his-own-weird-formatting-of-my-error-stack-trace/371772/1 "2024-12-10T14:38:57Z")

</div>

Hello

I'm using Discover in Kibana 8.2.2

When I display a my raw error.stack\_trace in Kibana Discover, I can see this extract :

```auto
\n\tat java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:580)\n\tat org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:355)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196) (...)

```

What I expect from Kibana is to replace "\n" by new lines and "\t" by tabs, like I would do in a text editor (replace "\\n" by "\n" special character and replace "\\t" by "\t" special character)

```auto
 	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:355)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196) (...)

```

but this is what I can see when I add the error.stack\_trace field to my Discover view :

![image](https://us1.discourse-cdn.com/elastic/original/3X/7/c/7c57cc2267b985270f074931ab674940f87f1ff1.png)  
It feels like Kibana has replaced spaces by `<br/>` and `\n` and `\t` by `&nbsp;`

Is this a feature or a bug ? Can I customize it ?

---

<div class="post-metadata">

**Author:** ![jughosta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jughosta/32/107160_2.png) [@jughosta](https://discuss.elastic.co/u/jughosta)\
**Post date:** [December 10, 2024, 3:34pm UTC](https://discuss.elastic.co/t/why-kibana-does-his-own-weird-formatting-of-my-error-stack-trace/371772/2 "2024-12-10T15:34:54Z")

</div>

Hi @Tristan107 and welcome to the community!

It was a bug. An upgrade to one of the latest versions (after 8.5) should resolve it.

---

<div class="post-metadata">

**Author:** ![Tristan107](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tristan107/32/139876_2.png) [@Tristan107](https://discuss.elastic.co/u/Tristan107)\
**Post date:** [December 10, 2024, 3:51pm UTC](https://discuss.elastic.co/t/why-kibana-does-his-own-weird-formatting-of-my-error-stack-trace/371772/3 "2024-12-10T15:51:54Z")

</div>

Ok thanks for confirming the bug, the workaround is to open the event using the "Toggle dialog with details" button on the left of the line, then clic on "Single document".

There the error.stack\_trace is properly formatted.
