ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - liveforeverx/exrun: Runtime and debugging tools for elixir
Runtime and debugging tools for elixir. Contribute to liveforeverx/exrun development by creating an account on GitHub.
Visit Site

GitHub - liveforeverx/exrun: Runtime and debugging tools for elixir

GitHub - liveforeverx/exrun: Runtime and debugging tools for elixir

Exrun

Version: 0.1.0

Something, like advanced runtime_tools for elixir.

Why another debugging tool? At first, the tracing setter is implemented as macro, because it allows to use native elixir macro capabilities to capture call in natural syntax (with arguments and conditions, see more examples and tests). Write tracing, as you write Elixir code.

Second is, safety, the tracer comes with possibility to ratelimit tracer with absolute and relative to time values. Default configuration is to disable tracing with a output rate more, than 250 messages in a second.

Another difference, is, that in some cases your will need to debug, different functions on different nodes, that it is possible to trace different functions on different nodes.

Additionally it prints time and how long the function took to execute (to analyse time consuming functions additionally).

Via erlang distributed you can use even exrun on production nodes, which doesn't have exrun installed. So if you need to trace something, you can attach it to any Elixir or even Erlang running system.

Setup project and app dependency in your mix.exs:

{:exrun, "~> 0.2.0"}

With remsh ( and with CLI in future ) it possible to trace nodes, where elixir or exrun are not installed, as it build to remote check and load modules needed (with option formatter_local: false only 2 modules) to trace the needed machine.

Example

iex(1)> use Tracer, node: my_remote_node, limit: %{rate: 1000, time: 1000}
nil
iex(2)> trace :lists.seq(a, b) when a < 1 and b > 100
{:ok, 2}
iex(3)> :lists.seq(0, 110)
#PID<0.68.0> [17:35:23.118] call :lists.seq(0, 110)
#PID<0.68.0> [3] returned :lists.seq/2 -> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, ...]
iex(4)> trace :erlang.make_tuple, [:stack]
{:ok, 2}
iex(5)> Tuple.duplicate(:hello, 3)
{:hello, :hello, :hello}
#PID<0.68.0> call :erlang.make_tuple(3, :hello)
  erl_eval.do_apply/6
  elixir.erl_eval/3
  elixir.eval_forms/4
  IEx.Evaluator.handle_eval/4
  IEx.Evaluator.eval/2
  IEx.Evaluator.loop/1
  IEx.Evaluator.start/2
#PID<0.68.0> returned :erlang.make_tuple/2 -> {:hello, :hello, :hello}

More documentation you should refer

iex(1)> h Tracer
iex(2)> h Tracer.trace

Feature Roadmap

  • Tracer
    • Pattern setter
      • set trace all functions in a module
      • set trace all module.function with any arity
      • module.function/arity
      • set trace for module.function(args...)
      • set trace module.function(args...) when conditions
      • set trace for send/receive
      • macro to set trace
      • unsetting of traces
    • Printer
      • format stacktrace
      • custom formatter
      • possibility to add timestamp to default formatter
      • possibility to pass inspect options
    • Distributed
      • distributed tracing
      • erlang distributed transport
      • environments-based configuration (for easily multinode setup)
      • io output with file shortcut
      • possibility to implement own transports(like file, tcp, zeromq), use formatters
    • time feature (Example, every 1 minute should be time printed or trace messages with, for correlation with other logs and so on)
    • overflow protection as an option
    • CLI
      • basic command line interface
      • tracer outputs
      • define trace nodes from CLI
      • define tracing patterns from CLI
      • define how should it be transported (erlang, tcp, custom)

License

Copyright 2015 Dmitry Russ

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory