2.0.2 • Published 8 years ago

galileo-agent v2.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

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

NameDescriptionDefault
logBodysend body of request/response with ALF recordfalse
queue.entriesnum of entries per ALF object100
limits.bodysizelimit captured request & response body size in bytes1000
collector.hostspecify the collector hostname to which you send your data'collector.galileo.mashape.com'
collector.portspecify the port of the collector server (Galileo cloud requires SSL port: 443443
collector.pathspecify the versioning path of the collector server'/1.1.0/single'
collector.sslspecify if the collector server has ssl enabled (Galileo cloud requires truetrue

Examples

Copyright and license

Copyright Mashape Inc, 2016.

Licensed under the MIT License