Code Monkey home page Code Monkey logo

galileo-agent-node's Introduction

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 and license

Copyright Mashape Inc, 2016.

Licensed under the MIT License

galileo-agent-node's People

Contributors

therebelrobot avatar kennethklee avatar nijikokun avatar thibaultcha avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.