Skip to content

Commit

Permalink
[8.x] [APM] Fix stack trace syntax highlight (#205187) (#205273)
Browse files Browse the repository at this point in the history
# Backport

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

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Carlos
Crespo","email":"[email protected]"},"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
<[email protected]>","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]
Fix stack trace syntax
highlight","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
<[email protected]>","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]
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
<[email protected]>","sha":"a78f61691f6de231b76083a52bdcb3db602df1a0"}}]}]
BACKPORT-->

Co-authored-by: Carlos Crespo <[email protected]>
  • Loading branch information
kibanamachine and crespocarlos authored Dec 30, 2024
1 parent 5615d9c commit 29b636b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
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 @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderCon
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

0 comments on commit 29b636b

Please sign in to comment.