Registry / observability / opbeat-http-client

opbeat-http-client

JSON →
library1.2.2jsnpmunverified

The `opbeat-http-client` is a low-level HTTP client designed specifically for interacting with the Opbeat intake API, intended for developers building higher-level Opbeat integration modules rather than direct application usage. Its last published version is 1.2.2, which was released before Opbeat's acquisition by Elastic in June 2017. Following the acquisition, the standalone Opbeat service was transitioned into Elastic APM, and related Opbeat agents (like `opbeat-node`) were deprecated in favor of Elastic APM agents. Consequently, this client is no longer maintained and its target API is obsolete. It primarily differentiates itself by being a minimal, focused client for a specific (now defunct) APM service, in contrast to general-purpose HTTP clients like Axios or Node's built-in `http` module.

npm install opbeat-http-client
INSTALL
IMPORT
SIG · OPBEAT-HTTP-CLIENT
O
opbeat-http-client
observabilityjavascriptv1.2.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

opbeatHttpClientFactory
const opbeatHttpClientFactory = require('opbeat-http-client');
import opbeatHttpClientFactory from 'opbeat-http-client';
This package uses CommonJS `require` syntax exclusively. It exports a factory function, not a direct client instance.
client.request
opbeatHttpClient.request('errors', body, callback);
The factory function returns a client instance with a `request` method. This method is the primary API for sending data to Opbeat endpoints like 'errors' or 'releases'.

Demonstrates initializing the Opbeat HTTP client with required credentials and making a request to the 'errors' endpoint. This example highlights that the underlying Opbeat service is deprecated.

const opbeatHttpClientFactory = require('opbeat-http-client'); // NOTE: The Opbeat service is deprecated. This code will likely fail // as the intake API endpoints are no longer active. // Replace with your actual (historical) Opbeat credentials if attempting to run. const client = opbeatHttpClientFactory({ appId: process.env.OPBEAT_APP_ID ?? 'your-app-id', organizationId: process.env.OPBEAT_ORG_ID ?? 'your-organization-id', secretToken: process.env.OPBEAT_SECRET_TOKEN ?? 'your-secret-token', userAgent: 'my-custom-module/1.0.0' }); const errorBody = { message: 'Simulated error from opbeat-http-client', culprit: 'example.js', timestamp: new Date().toISOString() }; client.request('errors', errorBody, function (err, res, body) { if (err) { console.error('Failed to send error to Opbeat:', err.message); // Expected error: 'getaddrinfo ENOTFOUND intake.opbeat.com' } else if (res && res.statusCode !== 202) { console.error(`Opbeat responded with status ${res.statusCode}: ${body}`); } else { console.log('Successfully sent error to Opbeat:', body); } }); console.log('Attempting to send data to deprecated Opbeat API...');
Debug
Known issues
breakingThe Opbeat service and its associated APIs were deprecated following its acquisition by Elastic in June 2017. This client communicates with the intake.opbeat.com API, which is no longer active. Any attempts to use this client will result in network errors or failed requests, as the service has been replaced by Elastic APM.
fix
Migrate to Elastic APM and use the official Elastic APM Node.js agent (or other language-specific agents) for application performance monitoring. This package is obsolete.
affects: >=1.0.0
deprecatedThis package is explicitly considered abandoned and unmaintained. Its last update was prior to 2018. Using it introduces risks associated with unpatched vulnerabilities, lack of compatibility with modern Node.js versions, and reliance on a defunct service.
fix
Do not use this package in new projects. For existing projects, prioritize migration to a current APM solution like Elastic APM or OpenTelemetry.
affects: >=1.0.0
gotchaThe client requires all initialization options (`appId`, `organizationId`, `secretToken`, `userAgent`) to be present. Omitting any of these will lead to runtime errors during client instantiation.
fix
Ensure the options object passed to the factory function contains all four required properties, even if they are placeholders due to the service's deprecation.
affects: >=1.0.0
Errors
Common errors & fixes
Error: getaddrinfo ENOTFOUND intake.opbeat.com
The Opbeat intake API endpoint (intake.opbeat.com) is no longer active or resolvable.
fix
This error confirms the Opbeat service is offline. The package is obsolete; migration to Elastic APM or another APM solution is required.
TypeError: opbeatHttpClient is not a function
Attempting to directly call `opbeat-http-client` as a function without `require` or using it like an ES module `import`.
fix
Ensure you are using `const opbeatHttpClient = require('opbeat-http-client')({ ... })` for CJS environments, passing the configuration object directly to the `require`'d factory function.
Upgrade
Version history
1.2.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
opbeat-http-client — npm install opbeat-http-client · libregistry