You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@elastic/apm-rum-core

Package Overview
Dependencies
Maintainers
0
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elastic/apm-rum-core

Elastic apm core


Version published
Weekly downloads
128K
decreased by-7.05%
Maintainers
0
Created
Weekly downloads
 

Package description

What is @elastic/apm-rum-core?

@elastic/apm-rum-core is a JavaScript library for Real User Monitoring (RUM) that allows you to measure the performance of your web applications. It helps you capture and analyze user interactions, page load times, and other performance metrics to improve the user experience.

What are @elastic/apm-rum-core's main functionalities?

Initialize APM

This code initializes the APM agent with the specified service name, server URL, and environment. Initialization is the first step to start monitoring your application.

const { init } = require('@elastic/apm-rum-core');
const apm = init({
  serviceName: 'my-service',
  serverUrl: 'http://localhost:8200',
  environment: 'production'
});

Capture Page Load Metrics

This function captures the page load metrics, including the time it takes for the page to load and other relevant performance data.

apm.capturePageLoad();

Capture Custom Transactions

This code demonstrates how to capture custom transactions. You can start a transaction, perform some operations, and then end the transaction to capture its performance metrics.

const transaction = apm.startTransaction('custom-transaction', 'custom');
// Perform some operations
transaction.end();

Capture Errors

This code captures errors that occur in your application. It helps you track and analyze errors to improve the stability and reliability of your application.

try {
  // Some code that might throw an error
} catch (error) {
  apm.captureError(error);
}

Other packages similar to @elastic/apm-rum-core

Readme

Source

Elastic APM JavaScript core (for development)

This is the core JavaScript module for Elastic APM.

Only use this package if you want to implement an integration for a framework that Elastic APM does not support yet.

Documentation

You can find our documentation on our website.

If you are interested in contributing to Elastic APM JavaScript agent, please see our contributing guide.

We'd love to hear your feedback, please take a minute to fill out our survey.

License

This project is MIT licensed.


Made with ♥️ and ☕️ by Elastic and our community.

FAQs

Package last updated on 27 Jun 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc