@rhrn/mastra-openobserve
v0.1.0
Published
openobserve connector for mastra observability
Readme
@rhrn/mastra-openobserve
OpenObserve connector for Mastra observability storage.
Backs Mastra's ObservabilityStorage domain with OpenObserve, so traces, spans, logs, metrics, scores, and feedback collected by Mastra are ingested into and queried from OpenObserve streams.
Installation
npm install @rhrn/mastra-openobserveRequires @mastra/core as a peer dependency.
Usage
import { Mastra } from '@mastra/core'
import { MastraCompositeStore } from '@mastra/core/storage'
import { OpenObserveStore } from '@rhrn/mastra-openobserve'
const openobserve = new OpenObserveStore({
url: process.env.OPENOBSERVE_URL,
basicAuth: process.env.OPENOBSERVE_BASIC_AUTH,
org: 'default',
})
const storage = new MastraCompositeStore({
id: 'composite-storage',
domains: {
observability: openobserve.observability,
},
})
export const mastra = new Mastra({ storage })Configuration
| Option | Env fallback | Default | Description |
| ----------- | ------------------------- | ----------- | ------------------------------------------------------ |
| url | OPENOBSERVE_URL | — | OpenObserve base URL (e.g. http://localhost:5080). |
| basicAuth | OPENOBSERVE_BASIC_AUTH | — | Base64-encoded user:password\|token for Basic auth. |
| org | — | default | OpenObserve organization. |
| id | — | openobserve | Storage instance id. |
url and basicAuth are required (either via constructor or env).
Streams
The connector writes to these OpenObserve streams:
spanslogsmetricsscoresfeedback
Exports
OpenObserveStore—MastraCompositeStoreexposing theobservabilitydomain.ObservabilityOpenObserve— the rawObservabilityStorageimplementation.OpenObserveClient— low-level HTTP client (ingest, search, delete stream).
License
ISC
