npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fh-reportingclient

v1.0.2

Published

FH Reporting Client

Downloads

146

Readme

fh-reportingclient -- The FeedHenry Reporting Client

npm package

Build status Dependency Status Known Vulnerabilities

| | Project Info | | --------------- | ------------- | | License: | Apache License, Version 2.0 | | Build: | npm | | Documentation: | http://docs.feedhenry.com/v3/api/cloud_api.html | | Issue tracker: | https://issues.jboss.org/projects/FH/summary | | Mailing list: | feedhenry-dev (subscribe) | | IRC: | #feedhenry channel in the freenode network. |

DESCRIPTION

The Feedhenry Reporting Client is a client library for Node.js applications that allows messages to be sent to a Feedhenry Reporting Server. (Formerly called a Messaging Server)

There's currently only one function available:

  • logMessage(topic, msg, callback) - log messages for a particular topic

Dependencies

The Reporting Client currently relies on the following being installed on a host:

  • node.js

  • npm (the Node Package Manager)

The Reporting Client currently operates it 2 ways:

  1. send a message to the Reporting Server for storage. (And eventual aggregation into a metrics report)
  2. save the message in a file. (Which is expected to be batch imported into the Reporting Server, similar to the way that Millicore is currently operating)

Installation

The Reporting Client is deployed by adding a dependency to your projects package.json file.

Running and Configuration

To use the Reporting Client you should add a dependency in your project to the latest build of fh-reportingclient. Within the code of your application, require the module, call the constructor - passing appropriate values, then call the logMessage() function where you want to log a message.

If there are errors sending to msgServer, the message will be saved to recoveryfile. Messages are always sent to msgServer and backupFile. If any or all of msgServer, recoveryFiles, backupFiles are not present in the config, the library will not attempt to send messages there, e.g. if msgServer is specifed, but not recoveryFiles or backupFiles, then the library will attempt to sen the message to the message server, but not save it to disk.

The parameters, "host" and "cluster", must be specified

Example:

var reporting = require('fh-reporting');
var config = {
  host: "dub1app1b",
  cluster: "dub1",
  msgServer: {
    logMessageURL: "http://some_internet_reporting_server_address:443/msg/TOPIC"
  },
  recoveryFiles: {
    fileName: "/mnt/some/path/recoveryFiles.log"
  },
  backupFiles: {
    fileName: "/mnt/some/path/backupMessages.log"
  }
};

var reportingClient = new reporting.Reporting(config);

reportingClient.logMessage("topicHello", {id: 27, text: "Hello World"});

// if desired a callback can be passed to accept results, but this will be of limited use to most applications
reportingClient.logMessage("topicHello", {id: 27, text: "Hello World"} , function (err, results) {
  console.log("results: " + results[0].handler + ", " + results[0].result.body);
});