The Wayback Machine - https://web.archive.org/web/20201005053633/https://github.com/GameAnalytics/har_redbug
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

har_redbug

Build Status

Attach to an Erlang node, trace both incoming and outgoing HTTP requests, and write a file in HAR format.

HAR files can be viewed in popular web browsers: open developer tools, select the "Network" tab, and drag and drop the HAR file into the window. You can also use the HTTP Archive Viewer Chrome extension.

The purpose of this tool is to get a transcript of HTTP requests for development, debugging, and documentation. It is possible to achieve something similar by capturing network traffic using e.g. tcpdump or Wireshark, but that doesn't work as well when connections are encrypted.

As the name implies, this tool is based on redbug.

Currently supported:

  • cowboy 1 and 2 (incoming requests)
  • shotgun (outgoing requests)
  • hackney (outgoing requests)

Build

$ rebar3 compile && rebar3 escriptize

This generates an escript archive in _build/default/bin/har_redbug. The archive is path-independent, so you can move it wherever you want. It only contains BEAM files, so it is platform-independent: you can run it anywhere you have escript in the path.

Run

$ _build/default/bin/har_redbug NODENAME -cookie COOKIE -msgs 1000 -time 15000

That is, connect to NODENAME with the given cookie, and collect data until 1000 trace messages have been received or 15 seconds have passed, whichever comes first.

The output is written to redbug.har in the current directory.

About

Trace an Erlang node and write HTTP requests to a file in HAR format

Topics

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.