mirror of
https://git.sleeping.town/mirrors/foxy-moxy
synced 2024-11-21 19:47:43 +00:00
Merge pull request #19 from Patreon/newrelic_datadog
Use datadog-connect instead of newrelic
This commit is contained in:
commit
21a47e0c45
2 changed files with 3 additions and 9 deletions
|
@ -20,9 +20,9 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"canvas": "^1.6.2",
|
"canvas": "^1.6.2",
|
||||||
"chance": "^1.0.4",
|
"chance": "^1.0.4",
|
||||||
|
"connect-datadog": "*",
|
||||||
"express": "^4.14.0",
|
"express": "^4.14.0",
|
||||||
"express-cluster": "0.0.4",
|
"express-cluster": "0.0.4",
|
||||||
"newrelic": "^1.35.1",
|
|
||||||
"node-gyp": "^3.4.0",
|
"node-gyp": "^3.4.0",
|
||||||
"sanitize-filename": "^1.6.1",
|
"sanitize-filename": "^1.6.1",
|
||||||
"uuid": "^3.0.1"
|
"uuid": "^3.0.1"
|
||||||
|
|
10
server.js
10
server.js
|
@ -1,12 +1,5 @@
|
||||||
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "newrelic" }] */
|
|
||||||
|
|
||||||
try {
|
|
||||||
const newrelic = require('newrelic')
|
|
||||||
} catch (e) {
|
|
||||||
console.error('WARNING unable to load newrelic')
|
|
||||||
}
|
|
||||||
|
|
||||||
const express = require('express')
|
const express = require('express')
|
||||||
|
const connectDatadog = require('connect-datadog')
|
||||||
const uuid = require('uuid/v4')
|
const uuid = require('uuid/v4')
|
||||||
const sanitize = require('sanitize-filename')
|
const sanitize = require('sanitize-filename')
|
||||||
const Canvas = require('canvas')
|
const Canvas = require('canvas')
|
||||||
|
@ -46,6 +39,7 @@ function getFox (req, res, version) {
|
||||||
|
|
||||||
const cacheTimeout = 60 * 60 * 24 * 30
|
const cacheTimeout = 60 * 60 * 24 * 30
|
||||||
const app = express()
|
const app = express()
|
||||||
|
app.use(connectDatadog({stat: 'foxy-moxy'}))
|
||||||
|
|
||||||
app.get('/healthcheck', (req, res) => {
|
app.get('/healthcheck', (req, res) => {
|
||||||
res.status(200).end()
|
res.status(200).end()
|
||||||
|
|
Loading…
Reference in a new issue