openlit / openlit/openlit

Feature: VictoriaLogs CE datasource connector

Open
#1,507 0 comments 0 reactions 0 assignees View on GitHub
:rocket: Feature client Connections
Dominant language
TypeScript
Stars
2.8k
Forks
385
Avg merge
5d 11m
Merged PRs (30d)
34

Description

## Component
OpenLIT (client)

## What feature would you like to see?
Add a **Community Edition (CE)** datasource connector for **VictoriaLogs** so projects can bind the **logs** signal to VictoriaLogs' LogQL-compatible query API.

Implementation should follow `src/client/src/lib/platform/connectors/datasource/README.md`:
- `datasource/victoria-logs/adapter.ts` extending `BaseExternalAdapter`
- `SourceTypeDescriptor` with `httpVendorFields`, `tenantField` (AccountID header), and honest capability flags
- Register factory in `bootstrap.ts`

**Target capabilities**
- Signal: `logs`
- LogQL query compilation from shared AI selector (similar to Loki adapter)
- Tenant / multi-tenancy via Victoria `AccountID` header
- Push-down aggregation; pixel-bounded downsampling per performance contract
- Health check against VictoriaLogs readiness endpoint

## Why do you need this?
VictoriaLogs is a growing OSS log backend in the VictoriaMetrics ecosystem. CE users who self-host VictoriaLogs alongside Tempo/Mimir cannot point OpenLIT log views at that store today — only Loki is supported for external logs.

Adding VictoriaLogs completes the Victoria stack alongside the proposed Mimir/VictoriaMetrics metrics connector and keeps OSS users on open, self-hosted backends.

## Additional context
- **Edition:** CE (`plan: free`)
- **Related:** VictoriaMetrics/Mimir metrics connector (separate issue)
- **Existing hints:** `telemetry-source-form-fields.test.ts` already covers VictoriaLogs AccountID tenant header behavior
- **Acceptance criteria:**
- [ ] Logs signal binding works (`/api/telemetry/logs`)
- [ ] Descriptor-driven form; no Prisma migration
- [ ] Unsupported trace/metrics capabilities throw `UnsupportedCapabilityError`
- [ ] SSRF-safe fetch via `http/safe-fetch`
- [ ] Unit tests for query compilation and normalization

## Pre-submission checklist
- [x] I searched existing issues and didn't find a duplicate

Contributor guide

Open the contributing guide

Research direction

Read src/client/src/lib/platform/connectors/datasource/README.md, then inspect the Loki adapter and telemetry-source-form-fields.test.ts for connector and AccountID patterns. Implement the VictoriaLogs adapter, descriptor, factory registration in bootstrap.ts, and the requested query-compilation and normalization tests. Done means logs binding works, readiness health checks use SSRF-safe fetch, and unsupported capabilities are rejected without a Prisma migration.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.