Skip to content

Commit 25067ae

Browse files
authored
[profiling] Add color for Executable flamegraph nodes (#215552)
Adds a type and color for `Executable` flamegraph nodes. The new type will be used by [this change](elastic/elasticsearch#119115) in the ES profiling plugin (the required code change from grouping by process name to grouping by executable name needs tbd).
1 parent ab78050 commit 25067ae

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/platform/packages/shared/kbn-profiling-utils/common/profiling.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export enum FrameType {
4242
Root = 0x100,
4343
ProcessName = 0x101,
4444
ThreadName = 0x102,
45+
ExecutableName = 0x103,
4546
}
4647

4748
const frameTypeDescriptions = {
@@ -59,8 +60,9 @@ const frameTypeDescriptions = {
5960
[FrameType.ErrorFlag]: 'ErrorFlag',
6061
[FrameType.Error]: 'Error',
6162
[FrameType.Root]: 'Root',
62-
[FrameType.ProcessName]: 'Process', // Due to OTEL semconv issues, "process name" is currently more correct than "executable name"
63+
[FrameType.ProcessName]: 'Process',
6364
[FrameType.ThreadName]: 'Thread',
65+
[FrameType.ExecutableName]: 'Executable',
6466
};
6567

6668
export function isErrorFrame(ft: FrameType): boolean {

x-pack/solutions/observability/plugins/profiling/common/frame_type_colors.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import { FrameType, normalizeFrameType } from '@kbn/profiling-utils';
3030
*/
3131
const RED = 0xfd8484;
3232
const ORANGE = 0xffaa00;
33+
const DARKORANGE = 0xff8800;
3334
const YELLOW = 0xe1e100;
3435

3536
export const FRAME_TYPE_COLOR_MAP = {
@@ -49,6 +50,7 @@ export const FRAME_TYPE_COLOR_MAP = {
4950
[FrameType.Root]: [RED, RED, RED, RED],
5051
[FrameType.ProcessName]: [ORANGE, ORANGE, ORANGE, ORANGE],
5152
[FrameType.ThreadName]: [YELLOW, YELLOW, YELLOW, YELLOW],
53+
[FrameType.ExecutableName]: [DARKORANGE, DARKORANGE, DARKORANGE, DARKORANGE],
5254
};
5355

5456
export function frameTypeToRGB(frameType: FrameType, x: number): number {

0 commit comments

Comments
 (0)