Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: get log pipelines trace parser working #3822

Merged
merged 4 commits into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down Expand Up @@ -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: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: stretch;

box-sizing: border-box;
padding: 0.25rem 0.5rem;
}

.logs-preview-list-item {
width: 100%;
position: relative;
width: 100%;
max-height: 2rem;

display: flex;
justify-content: space-between;
Expand Down
11 changes: 11 additions & 0 deletions frontend/src/types/api/pipeline/def.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down