Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gameanalytics/har_redbug
Trace an Erlang node and write HTTP requests to a file in HAR format
https://github.com/gameanalytics/har_redbug
cowboy debugging elixir erlang hackney http maru phoenix-framework
Last synced: 2 days ago
JSON representation
Trace an Erlang node and write HTTP requests to a file in HAR format
- Host: GitHub
- URL: https://github.com/gameanalytics/har_redbug
- Owner: GameAnalytics
- License: mit
- Created: 2018-08-29T16:35:30.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-12T17:25:54.000Z (over 5 years ago)
- Last Synced: 2023-07-12T19:50:27.903Z (over 1 year ago)
- Topics: cowboy, debugging, elixir, erlang, hackney, http, maru, phoenix-framework
- Language: Erlang
- Homepage:
- Size: 9.77 KB
- Stars: 9
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
har_redbug
=====[![Build Status](https://travis-ci.org/GameAnalytics/har_redbug.svg?branch=master)](https://travis-ci.org/GameAnalytics/har_redbug)
Attach to an Erlang node, trace both incoming and outgoing HTTP
requests, and write a file in [HAR format][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][har-viewer].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][redbug].
Currently supported:
* cowboy 1 and 2 (incoming requests)
* shotgun (outgoing requests)
* hackney (outgoing requests)[har-format]: http://www.softwareishard.com/blog/har-12-spec/
[har-viewer]: https://chrome.google.com/webstore/detail/http-archive-viewer/ebbdbdmhegaoooipfnjikefdpeoaidml
[redbug]: https://github.com/massemanet/redbugBuild
-----$ 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.