Skip to main content
Home

Built and signed on GitHub Actions

LogTape OpenTelemetry sink

This package works with Node.js, Deno, BunIt is unknown whether this package works with Cloudflare Workers, Browsers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
It is unknown whether this package works with Browsers
JSR Score
100%
Published
4 days ago (1.0.4)
interface OpenTelemetrySinkOptions

Options for creating an OpenTelemetry sink.

Properties

The OpenTelemetry logger provider to use.

optional
messageType:
"string"
| "array"
| BodyFormatter

The way to render the message in the log record. If "string", the message is rendered as a single string with the values are interpolated into the message. If "array", the message is rendered as an array of strings. "string" by default.

Or even fully customizable with a BodyFormatter function.

The way to render the object in the log record. If "json", the object is rendered as a JSON string. If "inspect", the object is rendered using util.inspect in Node.js/Bun, or Deno.inspect in Deno. "inspect" by default.

Whether to log diagnostics. Diagnostic logs are logged to the ["logtape", "meta", "otel"] category. Turned off by default.

The OpenTelemetry OTLP exporter configuration to use. Ignored if loggerProvider is provided.

The service name to use. If not provided, the service name is taken from the OTEL_SERVICE_NAME environment variable. Ignored if loggerProvider is provided.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@logtape/otel

Import symbol

import { type OpenTelemetrySinkOptions } from "@logtape/otel";
or

Import directly with a jsr specifier

import { type OpenTelemetrySinkOptions } from "jsr:@logtape/otel";

Add Package

pnpm i jsr:@logtape/otel
or (using pnpm 10.8 or older)
pnpm dlx jsr add @logtape/otel

Import symbol

import { type OpenTelemetrySinkOptions } from "@logtape/otel";

Add Package

yarn add jsr:@logtape/otel
or (using Yarn 4.8 or older)
yarn dlx jsr add @logtape/otel

Import symbol

import { type OpenTelemetrySinkOptions } from "@logtape/otel";

Add Package

vlt install jsr:@logtape/otel

Import symbol

import { type OpenTelemetrySinkOptions } from "@logtape/otel";

Add Package

npx jsr add @logtape/otel

Import symbol

import { type OpenTelemetrySinkOptions } from "@logtape/otel";

Add Package

bunx jsr add @logtape/otel

Import symbol

import { type OpenTelemetrySinkOptions } from "@logtape/otel";