Skip to content

Commit

Permalink
[8.16] [APM] Fix stack trace syntax highlight (#205187) (#205354)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.16`:
- [[APM] Fix stack trace syntax highlight
(#205187)](#205187)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Carlos
Crespo","email":"crespocarlos@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-12-30T15:48:38Z","message":"[APM]
Fix stack trace syntax highlight (#205187)\n\nfixes:
[#204957](https://github.com/elastic/kibana/issues/204957)\r\n\r\n##
Summary\r\n\r\nThis PR fixes the stack trace syntax
highlight\r\n\r\n<img width=\"1452\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/ee076fc6-c901-4e8f-a760-8c85a5470a26\"\r\n/>\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"a78f61691f6de231b76083a52bdcb3db602df1a0","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-major","Team:obs-ux-infra_services","v8.18.0","v8.17.1"],"number":205187,"url":"https://github.com/elastic/kibana/pull/205187","mergeCommit":{"message":"[APM]
Fix stack trace syntax highlight (#205187)\n\nfixes:
[#204957](https://github.com/elastic/kibana/issues/204957)\r\n\r\n##
Summary\r\n\r\nThis PR fixes the stack trace syntax
highlight\r\n\r\n<img width=\"1452\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/ee076fc6-c901-4e8f-a760-8c85a5470a26\"\r\n/>\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"a78f61691f6de231b76083a52bdcb3db602df1a0"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205187","number":205187,"mergeCommit":{"message":"[APM]
Fix stack trace syntax highlight (#205187)\n\nfixes:
[#204957](https://github.com/elastic/kibana/issues/204957)\r\n\r\n##
Summary\r\n\r\nThis PR fixes the stack trace syntax
highlight\r\n\r\n<img width=\"1452\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/ee076fc6-c901-4e8f-a760-8c85a5470a26\"\r\n/>\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"a78f61691f6de231b76083a52bdcb3db602df1a0"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/205273","number":205273,"state":"MERGED","mergeCommit":{"sha":"29b636b1fdc0ee1af3582eea4a229a4a6a437be5","message":"[8.x]
[APM] Fix stack trace syntax highlight (#205187) (#205273)\n\n#
Backport\n\nThis will backport the following commits from `main` to
`8.x`:\n- [[APM] Fix stack trace syntax
highlight\n(#205187)](https://github.com/elastic/kibana/pull/205187)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Carlos\nCrespo\",\"email\":\"crespocarlos@users.noreply.github.com\"},\"sourceCommit\":{\"committedDate\":\"2024-12-30T15:48:38Z\",\"message\":\"[APM]\nFix
stack trace syntax highlight
(#205187)\\n\\nfixes:\n[#204957](https://github.com/elastic/kibana/issues/204957)\\r\\n\\r\\n##\nSummary\\r\\n\\r\\nThis
PR fixes the stack trace syntax\nhighlight\\r\\n\\r\\n<img
width=\\\"1452\\\"\nalt=\\\"image\\\"\\r\\nsrc=\\\"https://github.com/user-attachments/assets/ee076fc6-c901-4e8f-a760-8c85a5470a26\\\"\\r\\n/>\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nkibanamachine\n<42973632+kibanamachine@users.noreply.github.com>\",\"sha\":\"a78f61691f6de231b76083a52bdcb3db602df1a0\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.18.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:skip\",\"v9.0.0\",\"backport:prev-major\",\"Team:obs-ux-infra_services\"],\"title\":\"[APM]\nFix
stack trace
syntax\nhighlight\",\"number\":205187,\"url\":\"https://github.com/elastic/kibana/pull/205187\",\"mergeCommit\":{\"message\":\"[APM]\nFix
stack trace syntax highlight
(#205187)\\n\\nfixes:\n[#204957](https://github.com/elastic/kibana/issues/204957)\\r\\n\\r\\n##\nSummary\\r\\n\\r\\nThis
PR fixes the stack trace syntax\nhighlight\\r\\n\\r\\n<img
width=\\\"1452\\\"\nalt=\\\"image\\\"\\r\\nsrc=\\\"https://github.com/user-attachments/assets/ee076fc6-c901-4e8f-a760-8c85a5470a26\\\"\\r\\n/>\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nkibanamachine\n<42973632+kibanamachine@users.noreply.github.com>\",\"sha\":\"a78f61691f6de231b76083a52bdcb3db602df1a0\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"branchLabelMappingKey\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/205187\",\"number\":205187,\"mergeCommit\":{\"message\":\"[APM]\nFix
stack trace syntax highlight
(#205187)\\n\\nfixes:\n[#204957](https://github.com/elastic/kibana/issues/204957)\\r\\n\\r\\n##\nSummary\\r\\n\\r\\nThis
PR fixes the stack trace syntax\nhighlight\\r\\n\\r\\n<img
width=\\\"1452\\\"\nalt=\\\"image\\\"\\r\\nsrc=\\\"https://github.com/user-attachments/assets/ee076fc6-c901-4e8f-a760-8c85a5470a26\\\"\\r\\n/>\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nkibanamachine\n<42973632+kibanamachine@users.noreply.github.com>\",\"sha\":\"a78f61691f6de231b76083a52bdcb3db602df1a0\"}}]}]\nBACKPORT-->\n\nCo-authored-by:
Carlos Crespo
<crespocarlos@users.noreply.github.com>"}},{"branch":"8.17","label":"v8.17.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/205272","number":205272,"state":"MERGED","mergeCommit":{"sha":"249e5ba71ba9146555d501d6a1dd91e8aefcf92a","message":"[8.17]
[APM] Fix stack trace syntax highlight (#205187) (#205272)\n\n#
Backport\n\nThis will backport the following commits from `main` to
`8.17`:\n- [[APM] Fix stack trace syntax
highlight\n(#205187)](https://github.com/elastic/kibana/pull/205187)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Carlos\nCrespo\",\"email\":\"crespocarlos@users.noreply.github.com\"},\"sourceCommit\":{\"committedDate\":\"2024-12-30T15:48:38Z\",\"message\":\"[APM]\nFix
stack trace syntax highlight
(#205187)\\n\\nfixes:\n[#204957](https://github.com/elastic/kibana/issues/204957)\\r\\n\\r\\n##\nSummary\\r\\n\\r\\nThis
PR fixes the stack trace syntax\nhighlight\\r\\n\\r\\n<img
width=\\\"1452\\\"\nalt=\\\"image\\\"\\r\\nsrc=\\\"https://github.com/user-attachments/assets/ee076fc6-c901-4e8f-a760-8c85a5470a26\\\"\\r\\n/>\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nkibanamachine\n<42973632+kibanamachine@users.noreply.github.com>\",\"sha\":\"a78f61691f6de231b76083a52bdcb3db602df1a0\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.18.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:skip\",\"v9.0.0\",\"backport:prev-major\",\"Team:obs-ux-infra_services\"],\"title\":\"[APM]\nFix
stack trace
syntax\nhighlight\",\"number\":205187,\"url\":\"https://github.com/elastic/kibana/pull/205187\",\"mergeCommit\":{\"message\":\"[APM]\nFix
stack trace syntax highlight
(#205187)\\n\\nfixes:\n[#204957](https://github.com/elastic/kibana/issues/204957)\\r\\n\\r\\n##\nSummary\\r\\n\\r\\nThis
PR fixes the stack trace syntax\nhighlight\\r\\n\\r\\n<img
width=\\\"1452\\\"\nalt=\\\"image\\\"\\r\\nsrc=\\\"https://github.com/user-attachments/assets/ee076fc6-c901-4e8f-a760-8c85a5470a26\\\"\\r\\n/>\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nkibanamachine\n<42973632+kibanamachine@users.noreply.github.com>\",\"sha\":\"a78f61691f6de231b76083a52bdcb3db602df1a0\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"branchLabelMappingKey\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/205187\",\"number\":205187,\"mergeCommit\":{\"message\":\"[APM]\nFix
stack trace syntax highlight
(#205187)\\n\\nfixes:\n[#204957](https://github.com/elastic/kibana/issues/204957)\\r\\n\\r\\n##\nSummary\\r\\n\\r\\nThis
PR fixes the stack trace syntax\nhighlight\\r\\n\\r\\n<img
width=\\\"1452\\\"\nalt=\\\"image\\\"\\r\\nsrc=\\\"https://github.com/user-attachments/assets/ee076fc6-c901-4e8f-a760-8c85a5470a26\\\"\\r\\n/>\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nkibanamachine\n<42973632+kibanamachine@users.noreply.github.com>\",\"sha\":\"a78f61691f6de231b76083a52bdcb3db602df1a0\"}}]}]\nBACKPORT-->\n\nCo-authored-by:
Carlos Crespo <crespocarlos@users.noreply.github.com>"}}]}] BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
crespocarlos and kibanamachine authored Jan 2, 2025
1 parent e67d250 commit 45b714e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Kibana source code with Kibana X-Pack source code
Copyright 2012-2024 Elasticsearch B.V.
Copyright 2012-2025 Elasticsearch B.V.

---
Adapted from remote-web-worker, which was available under a "MIT" license.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
TRANSACTION_ID,
ERROR_STACK_TRACE,
SPAN_ID,
SERVICE_LANGUAGE_NAME,
} from '../../../../common/es_fields/apm';
import { environmentQuery } from '../../../../common/utils/environment_query';
import { ApmDocumentType } from '../../../../common/document_type';
Expand Down Expand Up @@ -83,6 +84,7 @@ export async function getErrorSampleDetails({
SPAN_ID,
AGENT_VERSION,
PROCESSOR_NAME,
SERVICE_LANGUAGE_NAME,
ERROR_CULPRIT,
ERROR_STACK_TRACE,
ERROR_EXC_MESSAGE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ export default function ApiTest({ getService }: FtrProviderContext) {
it('displays correct error culprit info', () => {
expect(errorSampleDetailsResponse.error.error.culprit).to.equal('Error culprit 1');
});

it('displays correct language name', () => {
expect(errorSampleDetailsResponse.error.service.language?.name).to.equal('swift');
});
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ export async function generateData({
}) {
const serviceGoProdInstance = apm
.service({ name: serviceName, environment: 'production', agentName: 'swift' })
.defaults({
'service.language.name': 'swift',
})
.instance('instance-a');

const interval = '1m';
Expand Down

0 comments on commit 45b714e

Please sign in to comment.