-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[ AutoImport] Introduce automatic log type detection graph #190407
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
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
2f429c5
Add logtypedetection server changes
bhapas 4bff2b8
Add logtypedetection graph
bhapas bb36343
Remove JSON/NDJSON from UI
bhapas b8dde3f
Increase upload file size to 9MB
bhapas 6fb1fc2
Add unit tests
bhapas 71c2c74
Fix string docs and truncate logfile to 10 lines
bhapas 84521de
Merge branch 'main' into automatic_log_type_detection
bhapas cb5df15
Merge branch 'main' into automatic_log_type_detection
bhapas 7ad70fa
Merge branch 'main' into automatic_log_type_detection
elasticmachine 8a9e4d1
fix i18n translations
bhapas 25f824d
Move AnalyseLogs into own API call
bhapas 791f6ed
Add samplesFormat to state
bhapas ccca0dd
Merge remote-tracking branch 'upstream/main' into automatic_log_type_…
bhapas e606bd1
rollback unwanted changes
bhapas bf2d773
add and fix tests
bhapas baedbaf
Merge branch 'main' into automatic_log_type_detection
bhapas fe47446
minor fixes
bhapas e15a9bb
fix eslint errors
bhapas 5779abe
Merge branch 'main' into automatic_log_type_detection
elasticmachine 2b4b21f
Merge branch 'main' into automatic_log_type_detection
elasticmachine 46ef731
Merge branch 'main' into automatic_log_type_detection
bhapas c9cd54e
Fix typo
bhapas 5d84e2e
Merge branch 'main' into automatic_log_type_detection
bhapas 67c214c
Merge branch 'main' into automatic_log_type_detection
elasticmachine d6191a5
Merge branch 'main' into automatic_log_type_detection
elasticmachine cfb7fa9
fix UI related comments
bhapas 0aa14ec
Modify Parsing logic
bhapas 1cfba1a
Make it analyze
bhapas aae4c11
fix server side
bhapas 7238fc2
remove truncation
bhapas 50473e4
Merge branch 'main' into automatic_log_type_detection
bhapas 2bfd50c
fix comments
bhapas ff07a4e
Merge branch 'main' into automatic_log_type_detection
bhapas 62d7978
more fixes
bhapas bfb9c81
Merge branch 'main' into automatic_log_type_detection
bhapas bb8b4fe
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine 615e2e2
fix samplesFormat
bhapas 23dfbef
Update log parsing
bhapas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
x-pack/plugins/integration_assistant/__jest__/fixtures/log_type_detection.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
||
| import { SamplesFormatName } from '../../common/api/model/common_attributes'; | ||
|
|
||
| export const logFormatDetectionTestState = { | ||
| lastExecutedChain: 'testchain', | ||
| logSamples: ['{"test1": "test1"}'], | ||
| exAnswer: 'testanswer', | ||
| packageName: 'testPackage', | ||
| dataStreamName: 'testDatastream', | ||
| finalized: false, | ||
| samplesFormat: { name: SamplesFormatName.Values.json }, | ||
| ecsVersion: 'testVersion', | ||
| results: { test1: 'test1' }, | ||
| }; | ||
36 changes: 36 additions & 0 deletions
36
x-pack/plugins/integration_assistant/common/api/analyze_logs/analyze_logs_route.schema.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| openapi: 3.0.3 | ||
| info: | ||
| title: Auto Import Analyze Logs API endpoint | ||
| version: "1" | ||
| paths: | ||
| /api/integration_assistant/analyzelogs: | ||
| post: | ||
| summary: Analyzes log samples and processes them. | ||
| operationId: AnalyzeLogs | ||
| x-codegen-enabled: false | ||
| description: Analyzes log samples and processes them | ||
| tags: | ||
| - Analyze Logs API | ||
| requestBody: | ||
| required: true | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| required: | ||
| - logSamples | ||
| - connectorId | ||
| properties: | ||
| logSamples: | ||
| $ref: "../model/common_attributes.schema.yaml#/components/schemas/LogSamples" | ||
| connectorId: | ||
| $ref: "../model/common_attributes.schema.yaml#/components/schemas/Connector" | ||
| langSmithOptions: | ||
| $ref: "../model/common_attributes.schema.yaml#/components/schemas/LangSmithOptions" | ||
| responses: | ||
| 200: | ||
| description: Indicates a successful call. | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "../model/response_schemas.schema.yaml#/components/schemas/AnalyzeLogsAPIResponse" |
31 changes: 31 additions & 0 deletions
31
x-pack/plugins/integration_assistant/common/api/analyze_logs/analyze_logs_route.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
||
| /* | ||
| * NOTICE: Do not edit this file manually. | ||
| * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. | ||
| * | ||
| * info: | ||
| * title: Auto Import Analyze Logs API endpoint | ||
| * version: 1 | ||
| */ | ||
|
|
||
| import { z } from '@kbn/zod'; | ||
|
|
||
| import { LogSamples, Connector, LangSmithOptions } from '../model/common_attributes'; | ||
| import { AnalyzeLogsAPIResponse } from '../model/response_schemas'; | ||
|
|
||
| export type AnalyzeLogsRequestBody = z.infer<typeof AnalyzeLogsRequestBody>; | ||
| export const AnalyzeLogsRequestBody = z.object({ | ||
| logSamples: LogSamples, | ||
| connectorId: Connector, | ||
| langSmithOptions: LangSmithOptions.optional(), | ||
| }); | ||
| export type AnalyzeLogsRequestBodyInput = z.input<typeof AnalyzeLogsRequestBody>; | ||
|
|
||
| export type AnalyzeLogsResponse = z.infer<typeof AnalyzeLogsResponse>; | ||
| export const AnalyzeLogsResponse = AnalyzeLogsAPIResponse; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.