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

[APM] Display unparsed error stack traces if available #124204

Closed
axw opened this issue Feb 1, 2022 · 7 comments · Fixed by #156831
Closed

[APM] Display unparsed error stack traces if available #124204

axw opened this issue Feb 1, 2022 · 7 comments · Fixed by #156831
Labels
apm:errors-page apm:opentelemetry APM UI - OTEL Work needs design Team:APM All issues that need APM UI Team support

Comments

@axw
Copy link
Member

axw commented Feb 1, 2022

Describe the feature:

If neither error.exception.stacktrace nor error.log.stacktrace is available, the UI should look for the standard ECS field error.stack_trace and display that.

The error.stack_trace field is a plain text representation of a stack trace, as opposed to the non-ECS fields mentioned above which contain structured stack frame information. Unless we parse text stack traces in the UI (which I don't think we should), users will not be able to expand/collapse stack traces.

Describe a specific use case for the feature:

Elastic APM agents capture stack traces as structured data, but OpenTelemetry SDKs do not. The OpenTelemetry semantic conventions for exceptions specifies stack traces as follows:

A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.

Currently, APM Server attempts to parse stack traces received from OpenTelemetry SDKs. If it can do so, it will populate the structured stack trace fields; otherwise it will store the original stack trace in a plain text field. Currently that is a non-standard field, but we can just as easily store it in the error.stack_trace field.

If a stack trace cannot be parsed, it would be a better user experience if they could still see the original stacktrace text in the UI. See:

@axw axw added the Team:APM All issues that need APM UI Team support label Feb 1, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@glucaci
Copy link

glucaci commented Apr 6, 2022

There is any update on this?
I think showing the unparsed stack trace it will be very useful until it's implemented for each framework.

Thanks!

@glucaci
Copy link

glucaci commented May 25, 2022

By having #7154 in 8.3 means that unparsed stack trace will be shown in error view?

Thanks!

@axw
Copy link
Member Author

axw commented May 26, 2022

@glucaci elastic/apm-server#7154 is not enough, that just gets the data in Elasticsearch in the expected format. There are still changes required in Kibana (this issue).

@sorenlouv
Copy link
Member

@dannycroft Is this something we should consider for 8.4 or 8.5?

@dannycroft
Copy link

@sqren yeah this looks like a good candidate. Let's go through it in refinment 👍🏻

@glucaci
Copy link

glucaci commented Oct 31, 2022

Hi, any news on this one?

@AlexanderWert AlexanderWert added the apm:opentelemetry APM UI - OTEL Work label May 4, 2023
AlexanderWert added a commit that referenced this issue Jun 22, 2023
…156831)

## Summary

Closes #124204

Shows plaintext stacktrace when it's only available as a value in
`error.stack_trace` (which is mostly the case with OTel and mobile
agents).

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:errors-page apm:opentelemetry APM UI - OTEL Work needs design Team:APM All issues that need APM UI Team support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants