Galileo Node Agent

Collect and send request records to Galileo for aggregation / logging

for more information on Galileo, please visit getgalileo.io

Installation

npm install galileo-agent --save

Usage

var express = require('express')
var galileo = require('galileo-agent')

var app = express()
var agent = galileo('SERVICE_TOKEN')

app.use(agent)

app.get('/api', function (req, res) {
  res.send('Hello World!')
})

app.listen()

API

var galileo = require('galileo-agent')

galileo(serviceToken[, environment[, options]])

  • serviceToken: String (a Galileo Service Token)
  • environment: String (a Galileo Environment Slug)
  • options: Object (Agent Configuration Options)
galileo('SERVICE_TOKEN', 'PRODUCTION', {
  logBody: false,
  limits: {
    bodySize: 0
  },
  queue: {
    entries: 100
  },
  collector: {
    host: 'collector.galileo.mashape.com',
    port: 443,
    path: '/1.1.0/single',
    ssl: true
  }
})

Options

Name Description Default
logBody send body of request/response with ALF record false
queue.entries num of entries per ALF object 1000
limits.bodySize limit captured request & response body size in bytes 10000
collector.host specify the collector hostname to which you send your data 'collector.galileo.mashape.com'
collector.port specify the port of the collector server (Galileo cloud requires SSL port: 443 443
collector.path specify the versioning path of the collector server '/1.1.0/single'
collector.ssl specify if the collector server has ssl enabled (Galileo cloud requires true true

Examples

Copyright Mashape Inc, 2016.

Licensed under the MIT License