Skip to content

cheempz/logging-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logging-demo

Setup

Spin up an EC2 host to run the demo apps. It should have Docker, Docker Compose and the AppOptics Snap agent installed.

Clone this repo onto the EC2 host.

Sending to Loggly

The demo apps run in containers, their logs are sent to Loggly via the Snap agent Docker logs collector. See the example Snap task config in this project.

So application log messages go through this pipeline: docker json-files log driver --> snap agent --> loggly

Enable/disable Trace Context in Log

Python:

  • docker-compose environment variable APPOPTICS_LOG_TRACE_ID

PHP:

  • the line $log->pushProcessor('ao_processor'); in the logging.php script
  • config file setting appoptics.log_trace_id

Run

Set a valid APPOPTICS_API_TOKEN environment variable, then run the demo script:

export APPOPTICS_API_TOKEN=mysecretaoppopticsapitoken
cd logging-demo
./demo.sh

ctl-c to stop

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published