mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-16 09:55:57 +08:00
Fix: get log pipelines trace parser working (#3822)
* chore: add trace parser fields to log pipeline ProcessorData interface * chore: update trace parsing processor form field configs * chore: logs pipeline preview: better display of sample logs when too few logs in sample * fix: log pipelines: get tests passing: remove name prop passed to antd input
This commit is contained in:
parent
79aef73767
commit
45ead71359
@ -16,11 +16,7 @@ function DescriptionTextArea({
|
||||
label={<FormLabelStyle>{fieldData.fieldName}</FormLabelStyle>}
|
||||
key={fieldData.id}
|
||||
>
|
||||
<Input.TextArea
|
||||
rows={3}
|
||||
name={fieldData.name}
|
||||
placeholder={t(fieldData.placeholder)}
|
||||
/>
|
||||
<Input.TextArea rows={3} placeholder={t(fieldData.placeholder)} />
|
||||
</Form.Item>
|
||||
);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ function NameInput({ fieldData }: NameInputProps): JSX.Element {
|
||||
rules={formValidationRules}
|
||||
name={fieldData.name}
|
||||
>
|
||||
<Input name={fieldData.name} placeholder={t(fieldData.placeholder)} />
|
||||
<Input placeholder={t(fieldData.placeholder)} />
|
||||
</Form.Item>
|
||||
);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ function NameInput({ fieldData }: NameInputProps): JSX.Element {
|
||||
initialValue={fieldData.initialValue}
|
||||
rules={fieldData.rules ? fieldData.rules : formValidationRules}
|
||||
>
|
||||
<Input placeholder={t(fieldData.placeholder)} name={fieldData.name} />
|
||||
<Input placeholder={t(fieldData.placeholder)} />
|
||||
</Form.Item>
|
||||
</FormWrapper>
|
||||
</Container>
|
||||
|
@ -20,11 +20,7 @@ function ParsingRulesTextArea({
|
||||
name={fieldData.name}
|
||||
label={<ModalFooterTitle>{fieldData.fieldName}</ModalFooterTitle>}
|
||||
>
|
||||
<Input.TextArea
|
||||
rows={4}
|
||||
name={fieldData.name}
|
||||
placeholder={t(fieldData.placeholder)}
|
||||
/>
|
||||
<Input.TextArea rows={4} placeholder={t(fieldData.placeholder)} />
|
||||
</Form.Item>
|
||||
</FormWrapper>
|
||||
</Container>
|
||||
|
@ -24,7 +24,7 @@ export type ProcessorFormField = {
|
||||
id: number;
|
||||
fieldName: string;
|
||||
placeholder: string;
|
||||
name: string;
|
||||
name: string | Array<string>;
|
||||
rules?: Array<{ [key: string]: boolean }>;
|
||||
initialValue?: string;
|
||||
};
|
||||
@ -152,21 +152,21 @@ export const processorFields: { [key: string]: Array<ProcessorFormField> } = {
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
fieldName: 'Trace Id Parce From',
|
||||
fieldName: 'Parse Trace Id From',
|
||||
placeholder: 'processor_trace_id_placeholder',
|
||||
name: 'traceId',
|
||||
name: ['trace_id', 'parse_from'],
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
fieldName: 'Span id Parse From',
|
||||
fieldName: 'Parse Span Id From',
|
||||
placeholder: 'processor_span_id_placeholder',
|
||||
name: 'spanId',
|
||||
name: ['span_id', 'parse_from'],
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
fieldName: 'Trace flags parse from',
|
||||
fieldName: 'Parse Trace flags From',
|
||||
placeholder: 'processor_trace_flags_placeholder',
|
||||
name: 'traceFlags',
|
||||
name: ['trace_flags', 'parse_from'],
|
||||
},
|
||||
],
|
||||
retain: [
|
||||
|
@ -3,7 +3,6 @@
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: stretch;
|
||||
|
||||
box-sizing: border-box;
|
||||
@ -11,8 +10,9 @@
|
||||
}
|
||||
|
||||
.logs-preview-list-item {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-height: 2rem;
|
||||
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
@ -16,6 +16,17 @@ export interface ProcessorData {
|
||||
on_error?: string;
|
||||
field?: string;
|
||||
value?: string;
|
||||
|
||||
// trace parser fields.
|
||||
trace_id?: {
|
||||
parse_from: string;
|
||||
};
|
||||
span_id?: {
|
||||
parse_from: string;
|
||||
};
|
||||
trace_flags?: {
|
||||
parse_from: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface PipelineData {
|
||||
|
Loading…
x
Reference in New Issue
Block a user