Parseable Logstream Backend Plugin
Backend plugin for integrating Backstage with Parseable log streams using the new backend system.
Features
- Query logs from Parseable datasets
- List available datasets
- Export logs as CSV
- Health check endpoint
- Built with the new Backstage backend system
Installation
yarn --cwd packages/backend add @parseable/backstage-plugin-logstream-backend
Setup
Add the plugin to your backend in packages/backend/src/index.ts:
import { createBackend } from '@backstage/backend-defaults';
const backend = createBackend();
backend.add(import('@parseable/backstage-plugin-logstream-backend'));
backend.start();
API Endpoints
Health Check
GET /api/parseable-logstream/health - Health check endpoint
Datasets
POST /api/parseable-logstream/datasets - Get available datasets
- Body:
{ "baseUrl": "https://demo.parseable.com" }
- Headers:
Authorization: Bearer <backstage-token>
Query Logs
POST /api/parseable-logstream/query - Query logs from a dataset
- Body:
{ "baseUrl": "https://demo.parseable.com", "dataset": "string", "query": "string", "limit": 100 }
- Headers:
Authorization: Bearer <backstage-token>
Export Logs
POST /api/parseable-logstream/export/:dataset - Export logs as CSV
- Body:
{ "baseUrl": "https://demo.parseable.com", "query": "optional-query" }
- Headers:
Authorization: Bearer <backstage-token>
Configuration
The backend plugin automatically handles Parseable credentials:
- For demo.parseable.com: Uses built-in
admin:admin credentials
- For production: Configure
parseable.basicAuthCredential in your app-config.yaml
parseable:
basicAuthCredential: ${PARSEABLE_B64_CRED}
Development
To run the plugin locally:
yarn start
This will start a development backend with just the Parseable plugin loaded.
Configuration
The plugin uses the standard Backstage configuration system. No additional configuration is required as authentication and Parseable instance URLs are provided via API headers.