Deployments

Microbus recognizes four deployment environments:

  • PROD represents a production deployment
  • LAB represents a fully-functional non-production deployment such as dev integration, testing, staging, etc.
  • LOCAL represents development on an engineer’s local machine
  • TESTING represents a unit test running a testing application

The deployment environment impacts certain aspects of the framework such as structured logging and distributed tracing.

PRODLABLOCALTESTING
Logging levelINFODEBUGDEBUGDEBUG
Logging formatJSONJSONHuman-friendlyHuman-friendly
Logging errorsStandardStandardEmphasizedEmphasized
Distributed tracingSelectiveEverythingEverythingEverything
ConfiguratorEnabledEnabledEnabledDisabled
TickersEnabledEnabledEnabledDisabled
Error outputRedactedStack traceStack traceStack trace

The deployment environment is set according to the value of the MICROBUS_DEPLOYMENT environment variable. If not specified, PROD is assumed, unless connecting to NATS on nats://localhost:4222 or nats://127.0.0.1:4222 in which case LOCAL is assumed.