🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@mastra/laminar

Package Overview
Dependencies
Maintainers
1
Versions
405
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package version was removed
This package version has been unpublished, mostly likely due to security reasons
This package has malicious versions linked to the ongoing "Mastra AI framework compromise" supply chain attack.

Affected versions:

1.2.3
View campaign page

@mastra/laminar

Laminar observability provider for Mastra - tracing + scoring export

unpublished
Source
npmnpm
Version
1.2.3
Version published
Weekly downloads
2.5K
-30.75%
Maintainers
1
Weekly downloads
 
Created
Source

@mastra/laminar

Laminar observability exporter for Mastra applications.

Exports Mastra spans to Laminar via OTLP/HTTP (protobuf) and supports sending scorer results to Laminar Evaluators.

Installation

npm install @mastra/laminar

Usage

Zero-Config Setup

The exporter automatically reads credentials from environment variables:

# Required
LMNR_PROJECT_API_KEY=lmnr_...

# Optional
LMNR_BASE_URL=https://api.lmnr.ai
LAMINAR_ENDPOINT=https://api.lmnr.ai/v1/traces
import { LaminarExporter } from '@mastra/laminar';

const mastra = new Mastra({
  ...,
  observability: {
    configs: {
      laminar: {
        serviceName: 'my-service',
        exporters: [new LaminarExporter()],
      },
    },
  },
});

Explicit Configuration

import { LaminarExporter } from '@mastra/laminar';

const mastra = new Mastra({
  ...,
  observability: {
    configs: {
      laminar: {
        serviceName: 'my-service',
        exporters: [
          new LaminarExporter({
            apiKey: 'lmnr_...',
            baseUrl: 'https://api.lmnr.ai',
            endpoint: 'https://api.lmnr.ai/v1/traces', // Optional
            realtime: false, // Optional
          }),
        ],
      },
    },
  },
});

Configuration Options

OptionTypeDescription
apiKeystringLaminar project API key. Defaults to LMNR_PROJECT_API_KEY env var
baseUrlstringLaminar base URL. Defaults to LMNR_BASE_URL env var or https://api.lmnr.ai
endpointstringOTLP/HTTP traces endpoint. Defaults to LAMINAR_ENDPOINT env var or /v1/traces
headersRecord<string,string>Additional OTLP headers
realtimebooleanFlush after each span for immediate visibility. Defaults to false
disableBatchbooleanDisable batching (SimpleSpanProcessor). Defaults to false
batchSizenumberMax spans per batch (BatchSpanProcessor). Defaults to 512
timeoutMillisnumberOTLP export timeout (ms). Defaults to 30000

Notes

  • The exporter sets Laminar-specific attributes (lmnr.span.*, lmnr.association.properties.*) so traces render correctly in Laminar.

FAQs

Package last updated on 17 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts