MahrRah / moleculer-spike

Spike on how to use AppInsights with moleculer applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation

  1. Run npm install to install all packages
  2. Create an Application Insights Resource see docs
  3. Place Appliction-Key from AppInsight into env file
  4. Source .env export $(grep -v '^#' .env | xargs)
    • Unset env variables with unset $(grep -v '^#' .env | sed -E 's/(.*)=.*/\1/' | xargs)

Run Project

  1. Start the project with npm run dev command.

Services

  • api: API Gateway services
  • greeter: Sample service with hello and welcome actions.
    • hello calls hellotwo to test internal call tracing
    • welcome call external endpoint
  • greeter2: Sample service with hellotwo and welcome2 actions.
    • hello called by hellotwo to test internal call tracing
    • welcome2 throws a molecular error

TODO

  • Initial Tracer
  • Send errors to AppInsights
  • Send metrics to AppInsights
  • Track external calls

About

Spike on how to use AppInsights with moleculer applications


Languages

Language:HTML 47.9%Language:JavaScript 47.2%Language:Dockerfile 4.8%Language:Shell 0.2%