
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
office-addin-usage-data
Advanced tools
Provides infrastructure to send usage data events and exceptions.
The office-addin-usage-data npm package is designed to help developers collect and manage usage data for Office Add-ins. It provides tools for logging telemetry data, handling errors, and tracking user interactions to improve the quality and performance of Office Add-ins.
Logging Telemetry Data
This feature allows developers to log telemetry data for specific events within their Office Add-in. The code sample demonstrates how to create a telemetry object and send a success event with custom properties.
const usageData = require('office-addin-usage-data');
const telemetry = new usageData.OfficeAddinUsageData('my-app-name', 'my-app-version');
telemetry.sendUsageDataSuccessEvent('eventName', { property1: 'value1', property2: 'value2' });
Error Handling
This feature provides a way to handle errors by sending exception data to the telemetry service. The code sample shows how to catch an error and send it as an exception event.
const usageData = require('office-addin-usage-data');
const telemetry = new usageData.OfficeAddinUsageData('my-app-name', 'my-app-version');
try {
// Code that might throw an error
} catch (error) {
telemetry.sendUsageDataException('errorEvent', error);
}
Tracking User Interactions
Developers can track user interactions, such as button clicks, to understand how users are interacting with their add-in. The code sample demonstrates sending a success event when a button is clicked.
const usageData = require('office-addin-usage-data');
const telemetry = new usageData.OfficeAddinUsageData('my-app-name', 'my-app-version');
telemetry.sendUsageDataSuccessEvent('buttonClick', { buttonName: 'submit' });
Application Insights is a powerful telemetry service by Microsoft that provides detailed insights into application performance and user behavior. It offers more comprehensive features compared to office-addin-usage-data, including advanced analytics and integration with Azure services.
Winston is a versatile logging library for Node.js that can be used to log various levels of information, including errors and user interactions. While it doesn't specifically target Office Add-ins, it can be adapted for similar purposes with more customization required compared to office-addin-usage-data.
Log4js is another logging library for Node.js that provides a flexible way to log messages to different outputs. Like winston, it is not specifically designed for Office Add-ins but can be used to implement similar logging functionalities with additional setup.
This package allows for reporting usage data events and exception data to the selected telemetry infrastructure (e.g. ApplicationInsights).
The Office-Addin-Usage-Data package collects anonymized usage data and sends it to Microsoft. For more details on how we use this data and under what circumstances it may be shared, please see the Microsoft privacy statement.
The package collects:
Display the current usage data settings.
Syntax:
list
Sets the usage data level to Off(sending no usage data data).
Syntax:
off
Sets the usage data level to On(sending usage and exception data).
Syntax:
on
FAQs
Provides infrastructure to send usage data events and exceptions.
The npm package office-addin-usage-data receives a total of 121,227 weekly downloads. As such, office-addin-usage-data popularity was classified as popular.
We found that office-addin-usage-data 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.