# Data Collector for Web App

Here's how you can quickly get started capturing and analyzing your blockchain applications:

  1. If you don't have a Ravenpod account, sign up at ravenpod.com (opens new window). It's free!
  2. Follow the steps below to install Data Collector for Web App & Data Collector for Chaincode.
  3. Once you have data coming into Ravenpod, check out the dashboard (opens new window).

# NodeJS

# Hyperledger Fabric 2.x or above

# Requirements

# Installation

  1. Using npm:
npm install @ravenpod/ravenpod-web-dc
  1. Enable data collector in Express
//
// IMPORTANT
//
// Data collector's instrumentation can be overwritten by some middleware npm,
// e.g. body-parser 
// Make sure you enable the data collector AFTER your middleware initialization
//
const express = require("express");
const app = express();
// Enable Ravenpod
require('@ravenpod/ravenpod-web-dc')(app,
    {
        accessKey: 'YOUR ACCESS KEY',
        secretAccessKey: 'YOUR SECRET ACCESS KEY'
    }
);

# Hyperledger Fabric 1.4.x

# Requirements

# Installation

  1. Using npm:
npm install @ravenpod/ravenpod-web-dc@fabric14
  1. Enable data collector in Express
//
// IMPORTANT
//
// Data collector's instrumentation can be overwritten by some middleware npm,
// e.g. body-parser 
// Make sure you enable the data collector AFTER your middleware initialization
//
const express = require("express");
const app = express();
// Enable Ravenpod
require('@ravenpod/ravenpod-web-dc')(app,
    {
        accessKey: 'YOUR ACCESS KEY',
        secretAccessKey: 'YOUR SECRET ACCESS KEY'
    }
);

# TypeScript

# Hyperledger Fabric 2.x or above

# Requirements

# Installation

  1. Using npm:
npm install @ravenpod/ravenpod-web-dc
  1. Enable data collector in Express
import express from 'express';
import ravenpod = require('@ravenpod/ravenpod-web-dc');

const app = express();

// Enable Ravenpod
//
// IMPORTANT
//
// Data collector's instrumentation can be overwritten by some middleware npm,
// e.g. body-parser 
// Make sure you enable the data collector AFTER your middleware initialization
//
ravenpod(
    app,
    {
        accessKey: 'YOUR ACCESS KEY',
        secretAccessKey: 'YOUR SECRET ACCESS KEY'
    }
);

# Hyperledger Fabric 1.4.x

# Requirements

# Installation

  1. Using npm:
npm install @ravenpod/ravenpod-web-dc@fabric14
  1. Enable data collector in Express
import express from 'express';
import ravenpod = require('@ravenpod/ravenpod-web-dc');

const app = express();

// Enable Ravenpod
//
// IMPORTANT
//
// Data collector's instrumentation can be overwritten by some middleware npm,
// e.g. body-parser 
// Make sure you enable the data collector AFTER your middleware initialization
//
ravenpod(
    app,
    {
        accessKey: 'YOUR ACCESS KEY',
        secretAccessKey: 'YOUR SECRET ACCESS KEY'
    }
);

# Java

# Hyperledger Fabric 1.4.x

# Requirements

# Installation

  1. Download the data collector JAR file (opens new window)
  2. At the Spring Boot root directory, which is usually the same directory as pom.xml (e.g. ~/my-rest-service), create a file ravenpod.properties with the following content:
ACCESS_KEY=YOUR_ACCESS_KEY
SECRET_ACCESS_KEY=YOUR_SECRET_ACCESS_KEY
  1. Start your Spring Boot application with Ravenpod Crystal enabled by using the flag -javaagent. For example:
java -javaagent:/path_to_ravenpod/ravenpod-web-dc-java-1.0.jar -jar my-rest-service.jar