instructure / instructure/canvas-rce-api

Possible incorrect documentation for STATSD config

Open
#10 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
22
Forks
39
PR merge metrics
No merged PRs in 30d

Description

The README.md file does not say that STATSD_HOST and STATSD_PORT are required, but f I leave them out of my environment variables in this script:

#!/bin/bash
export ECOSYSTEM_KEY="astringthatisactually32byteslong"
export ECOSYSTEM_SECRET="astringthatisactually32byteslong"
export STATSD_HOST="127.0.0.1"
export STATSD_PORT=8125
export NODE_ENV="production"
export PORT=3000
npm start

I get this error:

> canvas-rce-api@1.0.0 start /var/canvas-rce
> node app.js

/var/canvas-rce/app/env.js:22
        throw EnvRequiredException.forVar(name);
        ^

EnvRequiredException: Environment variable "STATSD_HOST" is required
    at Function.forVar (/var/canvas-rce/app/exceptions/EnvRequiredException.js:7:12)
    at Object.require (/var/canvas-rce/app/env.js:22:36)
    at Object.module.exports.env [as stats] (/var/canvas-rce/config/stats.js:4:13)
    at Object.keys.forEach.key (/var/canvas-rce/app/config.js:14:65)
    at Array.forEach (<anonymous>)
    at Object.init (/var/canvas-rce/app/config.js:14:24)
    at make (/var/canvas-rce/node_modules/inja/index.js:19:32)
    at /var/canvas-rce/node_modules/inja/index.js:16:18
    at Array.map (<anonymous>)
    at make (/var/canvas-rce/node_modules/inja/index.js:15:41)
    at /var/canvas-rce/node_modules/inja/index.js:16:18
    at Array.map (<anonymous>)
    at make (/var/canvas-rce/node_modules/inja/index.js:15:41)
    at /var/canvas-rce/node_modules/inja/index.js:16:18
    at Array.map (<anonymous>)
    at make (/var/canvas-rce/node_modules/inja/index.js:15:41)
    at /var/canvas-rce/node_modules/inja/index.js:16:18
    at Array.map (<anonymous>)
    at make (/var/canvas-rce/node_modules/inja/index.js:15:41)
    at /var/canvas-rce/node_modules/inja/index.js:16:18
    at Array.map (<anonymous>)
    at Object.make (/var/canvas-rce/node_modules/inja/index.js:15:41)
    at Object.<anonymous> (/var/canvas-rce/app.js:8:28)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

I am not running statsd, so what information should I put in here to make rce-api happy but not actually require the use of statsd?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with README.md, then read config/stats.js and app/env.js to confirm how STATSD_HOST and STATSD_PORT are required. Clarify in the README which values are needed and whether the application can run without statsd; done means the documented setup matches the observed startup behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.