-
-
- server/routes.js
-
-
- in
-
-
-
- <anonymous>
-
-
- at
-
-
- line
- 307
-
-
+ ",
+ "library_frame": false,
+ "line": Object {
+ "context": " client.query('SELECT id FROM customers WHERE id=$1', [req.body.customer_id], next())",
+ "number": 307,
+ },
+ }
+ }
+ >
+
+
+ server/routes.js
+
+
+ in
+
+
+
+ <anonymous>
+
+
+ at
+
+
+ line
+ 307
+
+
+
@@ -383,8 +441,8 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "baseHash": -2021127760,
- "componentId": "sc-fzoLsD",
+ "baseHash": -1474970742,
+ "componentId": "sc-Axmtr",
"isStatic": false,
"rules": Array [
"
@@ -401,7 +459,7 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"foldedComponentIds": Array [],
"render": [Function],
"shouldForwardProp": undefined,
- "styledComponentId": "sc-fzoLsD",
+ "styledComponentId": "sc-Axmtr",
"target": "code",
"toString": [Function],
"warnTooManyClasses": [Function],
@@ -413,8 +471,8 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "baseHash": 1280172402,
- "componentId": "sc-fzozJi",
+ "baseHash": 1882630949,
+ "componentId": "sc-AxheI",
"isStatic": false,
"rules": Array [
"
@@ -439,7 +497,7 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"foldedComponentIds": Array [],
"render": [Function],
"shouldForwardProp": undefined,
- "styledComponentId": "sc-fzozJi",
+ "styledComponentId": "sc-AxheI",
"target": "pre",
"toString": [Function],
"warnTooManyClasses": [Function],
@@ -608,8 +666,8 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "baseHash": -2021127760,
- "componentId": "sc-fzoLsD",
+ "baseHash": -1474970742,
+ "componentId": "sc-Axmtr",
"isStatic": false,
"rules": Array [
"
@@ -626,7 +684,7 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"foldedComponentIds": Array [],
"render": [Function],
"shouldForwardProp": undefined,
- "styledComponentId": "sc-fzoLsD",
+ "styledComponentId": "sc-Axmtr",
"target": "code",
"toString": [Function],
"warnTooManyClasses": [Function],
@@ -638,8 +696,8 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "baseHash": 1280172402,
- "componentId": "sc-fzozJi",
+ "baseHash": 1882630949,
+ "componentId": "sc-AxheI",
"isStatic": false,
"rules": Array [
"
@@ -664,7 +722,7 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"foldedComponentIds": Array [],
"render": [Function],
"shouldForwardProp": undefined,
- "styledComponentId": "sc-fzozJi",
+ "styledComponentId": "sc-AxheI",
"target": "pre",
"toString": [Function],
"warnTooManyClasses": [Function],
@@ -834,8 +892,8 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "baseHash": -2021127760,
- "componentId": "sc-fzoLsD",
+ "baseHash": -1474970742,
+ "componentId": "sc-Axmtr",
"isStatic": false,
"rules": Array [
"
@@ -852,7 +910,7 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"foldedComponentIds": Array [],
"render": [Function],
"shouldForwardProp": undefined,
- "styledComponentId": "sc-fzoLsD",
+ "styledComponentId": "sc-Axmtr",
"target": "code",
"toString": [Function],
"warnTooManyClasses": [Function],
@@ -864,8 +922,8 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "baseHash": 1280172402,
- "componentId": "sc-fzozJi",
+ "baseHash": 1882630949,
+ "componentId": "sc-AxheI",
"isStatic": false,
"rules": Array [
"
@@ -890,7 +948,7 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"foldedComponentIds": Array [],
"render": [Function],
"shouldForwardProp": undefined,
- "styledComponentId": "sc-fzozJi",
+ "styledComponentId": "sc-AxheI",
"target": "pre",
"toString": [Function],
"warnTooManyClasses": [Function],
@@ -1070,8 +1128,8 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "baseHash": -2021127760,
- "componentId": "sc-fzoLsD",
+ "baseHash": -1474970742,
+ "componentId": "sc-Axmtr",
"isStatic": false,
"rules": Array [
"
@@ -1088,7 +1146,7 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"foldedComponentIds": Array [],
"render": [Function],
"shouldForwardProp": undefined,
- "styledComponentId": "sc-fzoLsD",
+ "styledComponentId": "sc-Axmtr",
"target": "code",
"toString": [Function],
"warnTooManyClasses": [Function],
@@ -1100,8 +1158,8 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "baseHash": 1280172402,
- "componentId": "sc-fzozJi",
+ "baseHash": 1882630949,
+ "componentId": "sc-AxheI",
"isStatic": false,
"rules": Array [
"
@@ -1126,7 +1184,7 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"foldedComponentIds": Array [],
"render": [Function],
"shouldForwardProp": undefined,
- "styledComponentId": "sc-fzozJi",
+ "styledComponentId": "sc-AxheI",
"target": "pre",
"toString": [Function],
"warnTooManyClasses": [Function],
@@ -1323,8 +1381,8 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "baseHash": -2021127760,
- "componentId": "sc-fzoLsD",
+ "baseHash": -1474970742,
+ "componentId": "sc-Axmtr",
"isStatic": false,
"rules": Array [
"
@@ -1341,7 +1399,7 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"foldedComponentIds": Array [],
"render": [Function],
"shouldForwardProp": undefined,
- "styledComponentId": "sc-fzoLsD",
+ "styledComponentId": "sc-Axmtr",
"target": "code",
"toString": [Function],
"warnTooManyClasses": [Function],
@@ -1353,8 +1411,8 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "baseHash": 1280172402,
- "componentId": "sc-fzozJi",
+ "baseHash": 1882630949,
+ "componentId": "sc-AxheI",
"isStatic": false,
"rules": Array [
"
@@ -1379,7 +1437,7 @@ exports[`Stackframe when stackframe has source lines should render correctly 1`]
"foldedComponentIds": Array [],
"render": [Function],
"shouldForwardProp": undefined,
- "styledComponentId": "sc-fzozJi",
+ "styledComponentId": "sc-AxheI",
"target": "pre",
"toString": [Function],
"warnTooManyClasses": [Function],
diff --git a/x-pack/plugins/apm/public/components/shared/Stacktrace/__test__/index.test.ts b/x-pack/plugins/apm/public/components/shared/Stacktrace/__test__/index.test.ts
index d268e0e6cee9e..cd8bf90301836 100644
--- a/x-pack/plugins/apm/public/components/shared/Stacktrace/__test__/index.test.ts
+++ b/x-pack/plugins/apm/public/components/shared/Stacktrace/__test__/index.test.ts
@@ -4,14 +4,14 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { IStackframe } from '../../../../../typings/es_schemas/raw/fields/stackframe';
+import { Stackframe } from '../../../../../typings/es_schemas/raw/fields/stackframe';
import { getGroupedStackframes } from '../index';
import stacktracesMock from './stacktraces.json';
describe('Stacktrace/index', () => {
describe('getGroupedStackframes', () => {
it('should collapse the library frames into a set of grouped stackframes', () => {
- const result = getGroupedStackframes(stacktracesMock as IStackframe[]);
+ const result = getGroupedStackframes(stacktracesMock as Stackframe[]);
expect(result).toMatchSnapshot();
});
@@ -37,7 +37,7 @@ describe('Stacktrace/index', () => {
exclude_from_grouping: false,
filename: 'file-d.txt',
},
- ] as IStackframe[];
+ ] as Stackframe[];
const result = getGroupedStackframes(stackframes);
@@ -89,7 +89,7 @@ describe('Stacktrace/index', () => {
exclude_from_grouping: false,
filename: 'file-b.txt',
},
- ] as IStackframe[];
+ ] as Stackframe[];
const result = getGroupedStackframes(stackframes);
expect(result).toEqual([
{
@@ -129,7 +129,7 @@ describe('Stacktrace/index', () => {
exclude_from_grouping: true,
filename: 'file-b.txt',
},
- ] as IStackframe[];
+ ] as Stackframe[];
const result = getGroupedStackframes(stackframes);
expect(result).toEqual([
{
@@ -158,14 +158,14 @@ describe('Stacktrace/index', () => {
});
it('should handle empty stackframes', () => {
- const result = getGroupedStackframes([] as IStackframe[]);
+ const result = getGroupedStackframes([] as Stackframe[]);
expect(result).toHaveLength(0);
});
it('should handle one stackframe', () => {
const result = getGroupedStackframes([
stacktracesMock[0],
- ] as IStackframe[]);
+ ] as Stackframe[]);
expect(result).toHaveLength(1);
expect(result[0].stackframes).toHaveLength(1);
});
diff --git a/x-pack/plugins/apm/public/components/shared/Stacktrace/frame_heading_renderers/c_sharp_frame_heading_renderer.tsx b/x-pack/plugins/apm/public/components/shared/Stacktrace/frame_heading_renderers/c_sharp_frame_heading_renderer.tsx
new file mode 100644
index 0000000000000..ed0dd6b42afe1
--- /dev/null
+++ b/x-pack/plugins/apm/public/components/shared/Stacktrace/frame_heading_renderers/c_sharp_frame_heading_renderer.tsx
@@ -0,0 +1,42 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+
+import React from 'react';
+import { FrameHeadingRendererProps } from './';
+import { DefaultFrameHeadingRenderer } from './default_frame_heading_renderer';
+
+export function CSharpFrameHeadingRenderer({
+ stackframe,
+ fileDetailComponent: FileDetail,
+}: FrameHeadingRendererProps) {
+ const { classname, filename, function: fn } = stackframe;
+ const lineNumber = stackframe.line?.number ?? 0;
+
+ if (classname) {
+ return (
+ <>
+