Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@datadog/browser-core
Advanced tools
The @datadog/browser-core package is a core library for Datadog's Real User Monitoring (RUM) and logging libraries. It provides foundational functionality for monitoring web applications, including the collection of telemetry data, handling of browser events, and communication with Datadog's servers.
Telemetry Data Collection
This code initializes the Datadog RUM SDK, which relies on @datadog/browser-core to collect telemetry data such as performance metrics, errors, and user actions.
import { datadogRum } from '@datadog/browser-rum';
datadogRum.init({
applicationId: 'YOUR_APP_ID',
clientToken: 'YOUR_CLIENT_TOKEN',
site: 'datadoghq.com',
service:'your-service-name',
// Specify a version number to identify the deployed version of your application in Datadog
version: '1.0.0',
sampleRate: 100,
trackInteractions: true,
});
Error Tracking
This code snippet demonstrates how to initialize Datadog's logging library, which uses @datadog/browser-core to track and forward errors to Datadog's servers for monitoring and alerting.
import { datadogLogs } from '@datadog/browser-logs';
datadogLogs.init({
clientToken: 'YOUR_CLIENT_TOKEN',
site: 'datadoghq.com',
forwardErrorsToLogs: true,
sampleRate: 100
});
datadogLogs.logger.error('Error message', { error: new Error('Error stack') });
User Action Tracking
This code demonstrates how to manually track user actions such as clicks, which can be used to measure user interaction and engagement within the application.
import { datadogRum } from '@datadog/browser-rum';
datadogRum.startUserAction('click', 'button clicked', {
element: document.getElementById('submit-button')
});
// After the action is completed
setTimeout(() => {
datadogRum.stopUserAction();
}, 1000);
Elastic APM Real User Monitoring (RUM) is a JavaScript agent for monitoring the performance of web applications in the browser. It is similar to Datadog's browser-core as it collects performance metrics, distributed tracing, and error tracking to provide insights into the end-user experience.
Raygun4js is a JavaScript SDK for Raygun, providing error tracking and real user monitoring capabilities. It captures errors, performance data, and user interactions, similar to what Datadog's browser-core offers, but with a focus on the Raygun platform.
core
Datadog browser core utilities.
v3.2.0
FAQs
Unknown package
The npm package @datadog/browser-core receives a total of 1,755,745 weekly downloads. As such, @datadog/browser-core popularity was classified as popular.
We found that @datadog/browser-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.