[Streams] Show field descriptions in ESQL editor and Discover sidebar#15
Closed
flash1293 wants to merge 1 commit intoralph/issue-35from
Closed
[Streams] Show field descriptions in ESQL editor and Discover sidebar#15flash1293 wants to merge 1 commit intoralph/issue-35from
flash1293 wants to merge 1 commit intoralph/issue-35from
Conversation
Adds support for stream-specific field descriptions to be displayed in the ESQL editor autocomplete and the Discover field sidebar when querying from a stream. Key changes: - Extended fields_metadata service with streams as a new field source - Added registerStreamsFieldsExtractor to allow streams plugin to provide field metadata - Streams plugin registers extractor that fetches field definitions with descriptions - Updated ESQL editor to parse FROM clause and fetch stream-specific descriptions - Updated Discover sidebar to pass stream context for field descriptions - Added API integration tests for end-to-end flow
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🍒 Summary
This PR adds support for showing stream-specific field descriptions in the ESQL editor autocomplete and the Discover field sidebar when querying from a stream (
FROM <stream_name>).This builds on top of elastic#250785 which adds the
descriptionproperty to stream field definitions.🛠️ Changes
fields_metadata service
FieldSourcetypeStreamsFieldsRepositoryclass to cache and fetch stream field metadataregisterStreamsFieldsExtractormethod to allow plugins to register field extractorsFieldsMetadataClientto query streams repository whenstreamNameparameter is providedstreamNameparameter to the HTTP API (/internal/fields_metadata)streams plugin
register_fields_metadata_extractors.tsto register field extractor at setupESQL editor
extractSourceFromQuery()function to parse FROM clause and extract stream nameresolveCompletionItemto fetch stream-specific field descriptionsDiscover sidebar
streamNameprop toFieldDescription,FieldPopoverHeader, andUnifiedFieldListItemUnifiedFieldListSidebarContainerto extract stream name from ES|QL queryTests
StreamsFieldsRepositoryextractSourceFromQueryin ESQL editor🎙️ Prompts
🤖 This pull request was assisted by Cursor