@appweaver/opentelemetry
v2.10.0
Published
Appweaver - the backend framework for AI-first development (@opentelemetry)
Maintainers
Readme
Description
@appweaver/opentelemetry exports the OpenTelemetry traces, metrics and logs of an
Appweaver application, a module enabled by installing it. The framework
records the spans and the metrics of the HTTP requests, the database operations, the queue jobs, the scheduled jobs,
the mailer, the SMS sender, the cache and the tasks through the OpenTelemetry API, and this module starts the SDK that
exports them over OTLP (HTTP) to any backend: a collector, Honeycomb, Datadog, Sentry, Grafana, New Relic and others.
Installation
npm install @appweaver/opentelemetryor weaver module add telemetry in a project created with @appweaver/create.
Configuration
// appweaver.json
"telemetry": {
"endpoint": "https://api.honeycomb.io",
"headers": ["x-honeycomb-team=${HONEYCOMB_API_KEY}"],
"logs": { "enabled": true }
}The standard OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS, OTEL_SERVICE_NAME and
OTEL_RESOURCE_ATTRIBUTES environment variables are read where the config sets nothing. A backend the config does not
cover is added with configureTelemetry:
import { configureTelemetry } from '@appweaver/opentelemetry';
configureTelemetry((options) => {
options.spanProcessors.push(new BatchSpanProcessor({ exporter: new MyVendorExporter() }));
});Documentation
- Telemetry reference – what is recorded, the config, the backends and the tests
- Appweaver README – getting started, configuration, and the overview of every package
- Agent skill – the complete framework reference shipped to every scaffolded project
License
Appweaver is MIT licensed.
