@autometrics/exporter-otlp-http
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@autometrics/exporter-otlp-http

Export metrics by pushing them to an OpenTelemetry Collector.

For this exporter to work, you need to have an Otel Collector running, see: https://opentelemetry.io/docs/collector/getting-started/

Documentation

Full documentation for the autometrics library can be found here: https://github.com/autometrics-dev/autometrics-ts.

Installation

# npm
npm install @autometrics/autometrics @autometrics/exporter-otlp-http

# yarn
yarn add @autometrics/autometrics @autometrics/exporter-otlp-http

# pnpm
pnpm add @autometrics/autometrics @autometrics/exporter-otlp-http

Usage

  1. Anywhere in your source code:
import { autometrics } from "@autometrics/autometrics";
import { init } from "@autometrics/exporter-otlp-http";

init({ url: "https://<your-otel-collector>" });

async function createUserRaw(payload: User) {
  // ...
}

const createUser = autometrics(createUserRaw);
// ^ instrumented function

Readme

Keywords

none

Package Sidebar

Install

npm i @autometrics/exporter-otlp-http

Weekly Downloads

8

Version

1.0.1

License

MIT

Unpacked Size

14.5 kB

Total Files

7

Last publish

Collaborators

  • oscarvz
  • arendjr
  • fiberplane-admin
  • bretterplane
  • keturiosakys