Remove unused/obsolete source type field from frames metadata (#150013)

## Summary
We don't use the source type for frames, but parse it from the query
response.

In the near future, we remove this field completely from the
`profiling-stackframes` index, because we have no reliable way to
determine the type of source code for a frame of type 'native' or
'kernel'.
For interpreted languages we have this information stored in the
`profiling-stacktraces` index.
This commit is contained in:
Tim Rühsen 2023-02-02 20:34:42 +01:00 committed by GitHub
parent 575c79ba4a
commit 62e0d0ebb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 2 additions and 23 deletions

View file

@ -59,7 +59,6 @@ describe('Stack trace response operations', () => {
function_name: 'pthread_create',
function_offset: 0,
line_number: 0,
source_type: 5,
},
},
executables: {
@ -89,7 +88,6 @@ describe('Stack trace response operations', () => {
FunctionName: 'pthread_create',
FunctionOffset: 0,
LineNumber: 0,
SourceType: 5,
},
],
]),
@ -134,7 +132,6 @@ describe('Stack trace response operations', () => {
function_name: 'pthread_create',
function_offset: undefined,
line_number: undefined,
source_type: undefined,
},
},
executables: {
@ -164,7 +161,6 @@ describe('Stack trace response operations', () => {
FunctionName: 'pthread_create',
FunctionOffset: null,
LineNumber: null,
SourceType: null,
},
],
]),

View file

@ -40,7 +40,6 @@ export function decodeStackTraceResponse(response: StackTraceResponse) {
FunctionName: value.function_name,
FunctionOffset: value.function_offset,
LineNumber: value.line_number,
SourceType: value.source_type,
} as StackFrame);
}

View file

@ -334,7 +334,6 @@ export async function mgetStackFrames({
FunctionName: frame._source!.Stackframe.function?.name,
FunctionOffset: frame._source!.Stackframe.function?.offset,
LineNumber: frame._source!.Stackframe.line?.number,
SourceType: frame._source!.Stackframe.source?.type,
};
stackFrames.set(frame._id, stackFrame);
frameLRU.set(frame._id, stackFrame);