@parseable/backstage-plugin-logstream-backend
v0.1.1
Published
Backend plugin for integrating with Parseable log streams
Downloads
9
Readme
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
# From your Backstage root directory
yarn --cwd packages/backend add @parseable/backstage-plugin-logstream-backendSetup
Add the plugin to your backend in packages/backend/src/index.ts:
import { createBackend } from '@backstage/backend-defaults';
const backend = createBackend();
// Add the Parseable logstream backend plugin
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>
- Body:
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>
- Body:
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>
- Body:
Configuration
The backend plugin automatically handles Parseable credentials:
- For demo.parseable.com: Uses built-in
admin:admincredentials - For production: Configure
parseable.basicAuthCredentialin yourapp-config.yaml
# app-config.yaml
parseable:
basicAuthCredential: ${PARSEABLE_B64_CRED} # Base64 encoded username:passwordDevelopment
To run the plugin locally:
yarn startThis 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.
