mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-17 11:05:52 +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>}
|
label={<FormLabelStyle>{fieldData.fieldName}</FormLabelStyle>}
|
||||||
key={fieldData.id}
|
key={fieldData.id}
|
||||||
>
|
>
|
||||||
<Input.TextArea
|
<Input.TextArea rows={3} placeholder={t(fieldData.placeholder)} />
|
||||||
rows={3}
|
|
||||||
name={fieldData.name}
|
|
||||||
placeholder={t(fieldData.placeholder)}
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ function NameInput({ fieldData }: NameInputProps): JSX.Element {
|
|||||||
rules={formValidationRules}
|
rules={formValidationRules}
|
||||||
name={fieldData.name}
|
name={fieldData.name}
|
||||||
>
|
>
|
||||||
<Input name={fieldData.name} placeholder={t(fieldData.placeholder)} />
|
<Input placeholder={t(fieldData.placeholder)} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ function NameInput({ fieldData }: NameInputProps): JSX.Element {
|
|||||||
initialValue={fieldData.initialValue}
|
initialValue={fieldData.initialValue}
|
||||||
rules={fieldData.rules ? fieldData.rules : formValidationRules}
|
rules={fieldData.rules ? fieldData.rules : formValidationRules}
|
||||||
>
|
>
|
||||||
<Input placeholder={t(fieldData.placeholder)} name={fieldData.name} />
|
<Input placeholder={t(fieldData.placeholder)} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</FormWrapper>
|
</FormWrapper>
|
||||||
</Container>
|
</Container>
|
||||||
|
@ -20,11 +20,7 @@ function ParsingRulesTextArea({
|
|||||||
name={fieldData.name}
|
name={fieldData.name}
|
||||||
label={<ModalFooterTitle>{fieldData.fieldName}</ModalFooterTitle>}
|
label={<ModalFooterTitle>{fieldData.fieldName}</ModalFooterTitle>}
|
||||||
>
|
>
|
||||||
<Input.TextArea
|
<Input.TextArea rows={4} placeholder={t(fieldData.placeholder)} />
|
||||||
rows={4}
|
|
||||||
name={fieldData.name}
|
|
||||||
placeholder={t(fieldData.placeholder)}
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</FormWrapper>
|
</FormWrapper>
|
||||||
</Container>
|
</Container>
|
||||||
|
@ -24,7 +24,7 @@ export type ProcessorFormField = {
|
|||||||
id: number;
|
id: number;
|
||||||
fieldName: string;
|
fieldName: string;
|
||||||
placeholder: string;
|
placeholder: string;
|
||||||
name: string;
|
name: string | Array<string>;
|
||||||
rules?: Array<{ [key: string]: boolean }>;
|
rules?: Array<{ [key: string]: boolean }>;
|
||||||
initialValue?: string;
|
initialValue?: string;
|
||||||
};
|
};
|
||||||
@ -152,21 +152,21 @@ export const processorFields: { [key: string]: Array<ProcessorFormField> } = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
fieldName: 'Trace Id Parce From',
|
fieldName: 'Parse Trace Id From',
|
||||||
placeholder: 'processor_trace_id_placeholder',
|
placeholder: 'processor_trace_id_placeholder',
|
||||||
name: 'traceId',
|
name: ['trace_id', 'parse_from'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
fieldName: 'Span id Parse From',
|
fieldName: 'Parse Span Id From',
|
||||||
placeholder: 'processor_span_id_placeholder',
|
placeholder: 'processor_span_id_placeholder',
|
||||||
name: 'spanId',
|
name: ['span_id', 'parse_from'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 4,
|
id: 4,
|
||||||
fieldName: 'Trace flags parse from',
|
fieldName: 'Parse Trace flags From',
|
||||||
placeholder: 'processor_trace_flags_placeholder',
|
placeholder: 'processor_trace_flags_placeholder',
|
||||||
name: 'traceFlags',
|
name: ['trace_flags', 'parse_from'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
retain: [
|
retain: [
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@ -11,8 +10,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.logs-preview-list-item {
|
.logs-preview-list-item {
|
||||||
width: 100%;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
max-height: 2rem;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
@ -16,6 +16,17 @@ export interface ProcessorData {
|
|||||||
on_error?: string;
|
on_error?: string;
|
||||||
field?: string;
|
field?: string;
|
||||||
value?: string;
|
value?: string;
|
||||||
|
|
||||||
|
// trace parser fields.
|
||||||
|
trace_id?: {
|
||||||
|
parse_from: string;
|
||||||
|
};
|
||||||
|
span_id?: {
|
||||||
|
parse_from: string;
|
||||||
|
};
|
||||||
|
trace_flags?: {
|
||||||
|
parse_from: string;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PipelineData {
|
export interface PipelineData {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user