add routing and performance columns to input table#25997
Open
AntonEbel wants to merge 24 commits into
Open
Conversation
4 tasks
patrickmann
reviewed
May 21, 2026
patrickmann
reviewed
May 21, 2026
9 tasks
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.
Description
Adds a pluggable entity metrics system that serves precomputed, permission-filtered metrics for entity tables via a single API call. Enterprise plugins can register additional descriptors via Guice named multibinding, extending the same endpoint without modifying open-source code.
Endpoint
GET /system/inputs/metrics?input_ids=<id>&fields=messages_per_stream&fields=extractor_countColumns
Message Count (Last 24H)
Badge: Total message count for the input over the last 24 hours.
messages_per_streamMap<String, Long>— stream ID → message count, filtered by the user'sstreams:readpermissionstermsaggregation ongl2_source_inputgrouped bystreams(24h window, cached in MongoDB with 5m TTL)Expandable: Per-stream message breakdown.
messages_per_streammapPOST /system/catalog/entities/titleswith the stream IDs from the map keys<id> (deleted)Example response:
{ "metrics": { "66756e35f932ec1c3ab6b68a": { "messages_per_stream": { "000000000000000000000001": 76249, "000000000000000000000004": 7076 } } } }Extractor Count
Badge: Number of extractors configured on the input.
extractor_countInteger— count of embedded extractors in the input document$sizeon the embeddedextractorsarray (single batch query for all requested inputs, not cached)Expandable: List of extractors with links to detail view.
GET /system/inputs/{inputId}/extractors(existing endpoint, lazy-loaded on click)Example response:
{ "metrics": { "66756e35f932ec1c3ab6b68a": { "extractor_count": 2 } } }Associated Streams (Last 24H)
No separate field — derived from
messages_per_stream.Badge: Number of streams that received messages from this input.
messages_per_streammapExpandable: List of associated streams with links.
messages_per_streammapPOST /system/catalog/entities/titleswith the stream IDs<id> (deleted)Architecture
EntityMetricDescriptor— base interface,EntityCachedMetricDescriptor<C, R>for cached metrics,EntityUncachedMetricDescriptor<R>for fresh-per-request metricsEntityMetricsService— orchestrates cache lookup, stale field recomputation, and per-user permission filteringMetricsCacheService— MongoDB-backed cache with per-field TTLs and 24h TTL index cleanupEntityMetricsModuleTypes of changes
/nocl