feat(logs): implement enhanced log filtering and aggregation #43

Closed
opened 2026-04-05 16:18:45 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @simlarsen on 3/7/2026

Summary

Comprehensive enhancement of log management features with advanced filtering, faceting, histograms, and improved search capabilities.

Changes

Core Features

  • Log Query Parser: New LogQueryParser for parsing Datadog-style search syntax with support for field filters, attributes, operators, and boolean logic
  • Log Query to Filter: Converts parsed query tokens into database Query objects
  • Log Aggregation Service: Server-side service for histogram and facet aggregation with time bucketing and filtering
  • Telemetry API: New endpoints /telemetry/logs/histogram and /telemetry/logs/facets for aggregated log data

UI Components

  • LogSearchBar: Enhanced search input with autocomplete suggestions and field:value support
  • LogSearchHelp: Help modal for search syntax guidance
  • LogSearchSuggestions: Dynamic suggestion dropdown for fields and values
  • LogTimeRangePicker: Time range selector with preset ranges and custom date picker
  • LogsHistogram: Interactive histogram visualization with time range selection
  • LogsFacetSidebar: Sidebar panel showing facet values with include/exclude filters
  • FacetSection & FacetValueRow: Facet display components with multi-value selection
  • ActiveFilterChips: Display and management of applied filters
  • HistogramTooltip: Enhanced tooltip styling for histogram buckets

Integration

  • Time range state management (preset and custom ranges)
  • Multi-value facet filtering with active filter tracking
  • Histogram and facet requests include active filters for context-aware data
  • Search bar field:value selection adds filters as chips
  • Removed sidebar from Logs layout for cleaner UI

Improvements

  • Better callback memoization with useCallback
  • Extracted helper functions for query building and API calls
  • Enhanced live mode management with proper state cleanup
  • Support for traceId and spanId filters
  • Improved code organization and readability

Files Modified

  • Dashboard logs viewer with enhanced state and handlers
  • Common UI LogsViewer with new aggregation features
  • Server APIs and services for log aggregation
  • Type definitions for new structures
*Originally created by @simlarsen on 3/7/2026* ## Summary Comprehensive enhancement of log management features with advanced filtering, faceting, histograms, and improved search capabilities. ## Changes ### Core Features - **Log Query Parser**: New `LogQueryParser` for parsing Datadog-style search syntax with support for field filters, attributes, operators, and boolean logic - **Log Query to Filter**: Converts parsed query tokens into database Query objects - **Log Aggregation Service**: Server-side service for histogram and facet aggregation with time bucketing and filtering - **Telemetry API**: New endpoints `/telemetry/logs/histogram` and `/telemetry/logs/facets` for aggregated log data ### UI Components - **LogSearchBar**: Enhanced search input with autocomplete suggestions and field:value support - **LogSearchHelp**: Help modal for search syntax guidance - **LogSearchSuggestions**: Dynamic suggestion dropdown for fields and values - **LogTimeRangePicker**: Time range selector with preset ranges and custom date picker - **LogsHistogram**: Interactive histogram visualization with time range selection - **LogsFacetSidebar**: Sidebar panel showing facet values with include/exclude filters - **FacetSection** & **FacetValueRow**: Facet display components with multi-value selection - **ActiveFilterChips**: Display and management of applied filters - **HistogramTooltip**: Enhanced tooltip styling for histogram buckets ### Integration - Time range state management (preset and custom ranges) - Multi-value facet filtering with active filter tracking - Histogram and facet requests include active filters for context-aware data - Search bar field:value selection adds filters as chips - Removed sidebar from Logs layout for cleaner UI ### Improvements - Better callback memoization with `useCallback` - Extracted helper functions for query building and API calls - Enhanced live mode management with proper state cleanup - Support for traceId and spanId filters - Improved code organization and readability ## Files Modified - Dashboard logs viewer with enhanced state and handlers - Common UI LogsViewer with new aggregation features - Server APIs and services for log aggregation - Type definitions for new structures
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#43