-
Notifications
You must be signed in to change notification settings - Fork 715
feat: service discovery #9469
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
feat: service discovery #9469
Conversation
|
Failed to generate code suggestions for PR |
Greptile OverviewGreptile SummaryThis PR implements a comprehensive service discovery feature that automatically discovers services from telemetry data and enables correlation across logs, traces, and metrics. The implementation includes database migrations, backend processing in both ingester and compactor modes, HTTP APIs for correlation and analytics, and a full frontend UI with Vue components. Key Changes
Critical Issue FoundThe database migration Architecture Highlights
Confidence Score: 2/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant UI as Frontend UI
participant API as API Handler
participant Ingester
participant Compactor
participant Processor as Stream Processor
participant BatchProc as Batch Processor
participant DB as Database
participant Cache
Note over User,Cache: Service Discovery Flow
rect rgb(240, 248, 255)
Note over Ingester,DB: Data Ingestion Path (Ingester Mode)
Ingester->>Ingester: Process parquet file
Ingester->>Ingester: Check sampling (hash-based)
alt Should process file
Ingester->>Processor: Extract services from parquet
Processor->>Processor: Read record batches
Processor->>Processor: Extract semantic dimensions
Processor->>Processor: Check cardinality limits
Processor->>Processor: Generate correlation_key (stable dims)
Processor->>BatchProc: Queue services for batch write
BatchProc->>DB: Upsert services (by correlation_key)
BatchProc->>DB: Track dimension cardinality
end
end
rect rgb(255, 248, 240)
Note over Compactor,DB: Data Compaction Path (Compactor Mode)
Compactor->>Compactor: Merge parquet files
Compactor->>Processor: Extract services from merged data
Processor->>Processor: Convert RecordBatch to HashMap
Processor->>Processor: Process records (same as ingester)
Processor->>BatchProc: Queue services
BatchProc->>DB: Upsert services
end
rect rgb(240, 255, 240)
Note over User,Cache: Telemetry Correlation Flow
User->>UI: Click log/trace/metric row
UI->>UI: Extract available dimensions
UI->>API: POST /service_streams/_correlate
API->>DB: Query by dimensions (correlation_key)
DB->>API: Return matched service + streams
API->>API: Build CorrelationResponse
API->>API: Separate matched vs additional dims
API->>UI: Return related streams
UI->>UI: Display correlation panel
User->>UI: Click "View" on related stream
UI->>UI: Navigate with filters applied
end
rect rgb(255, 240, 255)
Note over User,DB: Analytics & Configuration
User->>UI: View dimension analytics
UI->>API: GET /service_streams/_analytics
API->>DB: Calculate cardinality per dimension
API->>API: Classify dimensions (VeryLow/Low/Medium/High/VeryHigh)
API->>UI: Return analytics summary
UI->>UI: Display recommended dimensions
User->>UI: Import semantic groups
UI->>API: POST /alerts/deduplication/semantic-groups/preview-diff
API->>DB: Get current semantic groups
API->>API: Compare with imported groups
API->>UI: Return additions/modifications/unchanged
User->>UI: Confirm import
UI->>API: PUT /alerts/deduplication/semantic-groups
API->>DB: Save semantic groups
API->>Cache: Invalidate cache
end
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
47 files reviewed, 2 comments
src/infra/src/table/migration/m20251126_100001_create_service_streams_table.rs
Show resolved
Hide resolved
src/infra/src/table/migration/m20251126_100001_create_service_streams_table.rs
Show resolved
Hide resolved
32e2b13 to
5dbcb8b
Compare
Auto-generated translation updates from English source file. 🤖 Generated with automated translation workflow
dc0dddb to
bc1e5ff
Compare
Design at:
streams-corelation/SERVICE_CORRELATION_ARCHITECTURE.md