Skip to content

Commit

Permalink
[APM] Fix stack trace syntax highlight (elastic#205187)
Browse files Browse the repository at this point in the history
fixes: [elastic#204957](elastic#204957)

## Summary

This PR fixes the stack trace syntax highlight

<img width="1452" alt="image"
src="https://github.com/user-attachments/assets/ee076fc6-c901-4e8f-a760-8c85a5470a26"
/>

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
crespocarlos and kibanamachine authored Dec 30, 2024
1 parent 5cfbc75 commit a78f616
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 a78f616

Please sign in to comment.