Skip to content

braxtonj/wix_logdna_adapter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WIX Adapter for LogDNA

Middleware service to route your WIX logs to LogDNA.

Contents

Setup

LogDNA

Ensure you have a LogDNA account and an API key for your account. Head over to LogDNA.com to sign up if you haven't yet.

Deployment Options

Deploy either locally or to the server of your choice.

Local

  1. Requirements on server
    • Node v14
    • git
    • ngrok
  2. Download the repo
git clone https://github.com/braxtonj/wix_logdna_adapter
  1. Navigate to src/ and install the system
cd wix_logdna_adapter/src
npm install
  1. Create an .env file with your LogDNA API key. This must be defined to work
echo "LOGDNA_API_KEY=YOUR_API_KEY" >> src/.env
  1. Run
npm start
  1. In a new terminal, run ngrok to expose localhost to the internet and get your "url"
ngrok http 3000

AWS Elastic Beanstalk

AWS Elastic Beanstalk deployment is as a scalable alternative to bare metal. You can read more about this process here.

  1. Prerequisites
  2. Download the repo and cd to src
git clone https://github.com/braxtonj/wix_logdna_adapter
cd wix_logdna_adapter/src
  1. Initialize Elastic Beanstalk
eb init --platform node.js --region us-west-2 wix-logdna-adapter
  1. Create the EB environment
eb create
  1. Open in your browser to check the exposed url. Note that /log is the defined endpoint for WIX logs but this will take you to /
eb open

WIX Log Monitoring

  1. Log in to your WIX account
  2. Set up Site Monitoring with the appropriate endpoint for a running service
    • Within your WIX site's dashboard, navigate to Setting->Developer Tools->Site Monitoring->Connect Monitoring Tools and enter the server's external IP with the /log endpoint.
      • IE https://myserver.com/log
      • Once done, you should begin seeing all your WIX logs streaming into your LogDNA account.

Verify

Double check that your website's event logs are hitting your LogDNA account by heading over to the Log Dashboard.

Next Steps

Chances are all your logs are not the same. While LogDNA handles many logging formats, no system is a panacea. Consider checking out LogDNA's custom parsing before resorting to modifying this repo for special cases or refactoring your app's logs.

Support

Note this is repo is not officially support by LogDNA. Code is provided as-is.

However, if you have questions feel free to open Issues!

Contributing

Always welcome. All contributers will be recognized. See CONTRIBUTING.md

License

MIT license

All Contributors

About

WIX Apadter for LogDNA

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published