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 plaintext stacktrace on spans #169769

Closed
AlexanderWert opened this issue Oct 25, 2023 · 5 comments · Fixed by #172489
Closed

[APM] Display plaintext stacktrace on spans #169769

AlexanderWert opened this issue Oct 25, 2023 · 5 comments · Fixed by #172489
Assignees
Labels
enhancement New value added to drive a business result Team:APM All issues that need APM UI Team support Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team

Comments

@AlexanderWert
Copy link
Member

AlexanderWert commented Oct 25, 2023

Describe the feature:
Currently the stacktraces in spans are only being shown for data coming from the Elastic APM agents, not for OTel-based agents.
Stacktraces reported by OTel agents are in plaintext.
If stacktraces are provided in plain text field (e.g. by OTel agents) they should be displayed in the span flyout.

PR to add a code.stacktrace attribute in semantic conventions: open-telemetry/semantic-conventions#435

A sample document is available in elastic/apm-data#184 description.

@AlexanderWert AlexanderWert added the Team:APM All issues that need APM UI Team support label Oct 25, 2023
@elasticmachine
Copy link
Contributor

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

@SylvainJuge
Copy link
Member

I have completed the apm-server/apm-data implementation, which is not yet merged.
A sample span document is available in elastic/apm-data#184 description, which should allow to implement the UI.

@smith smith added the Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team label Nov 29, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@smith smith added the enhancement New value added to drive a business result label Nov 29, 2023
@crespocarlos crespocarlos self-assigned this Nov 30, 2023
@crespocarlos
Copy link
Contributor

Is the expectation here that the Otel plain text stacktrace is parsed, such that the flyout content can be displayed similar to when Elastic APM agents generate the stack trace?

Image

@SylvainJuge
Copy link
Member

No parsing of the stack trace is expected here, at least for now.

The goal is to provide an equivalent UI to what is available in the APM spans, for which we don't have the source code (the example you refer to here probably means source maps have been integrated, which is not available for most APM agents).

Here is what it currently looks like with the Java Elastic APM agent (but the original data is provided parsed and the text rendering is re-implemented in UI to make it look like text).

image

crespocarlos added a commit that referenced this issue Dec 18, 2023
closes #169769

## Summary

This PR adapts the Stack Trace tab to also display plaintext stacktraces
generated by Otel agents

<img width="1201" alt="image"
src="https://github.com/elastic/kibana/assets/2767137/d0dafc6a-f251-4cd7-b50f-1e00d5e76e76">

<img width="1201" alt="image"
src="https://github.com/elastic/kibana/assets/2767137/a8ed7847-2d82-4716-9c27-41dae2375d7f">

<img width="1201" alt="image"
src="https://github.com/elastic/kibana/assets/2767137/118b61c2-c646-4cf1-b6c9-4aadc8e836ec">


### How to test

The easiest way to test:
```bash
node x-pack/plugins/apm/scripts/test/e2e.js --spec span_stacktrace.cy.ts   
```

---------

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Team:APM All issues that need APM UI Team support Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants