<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Nicolas B. - ruby</title>
    <subtitle>Nicolas B., Ruby Backend Developer</subtitle>
    <link rel="self" type="application/atom+xml" href="https://nicolas-brousse.fr/tags/ruby/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://nicolas-brousse.fr"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2017-01-05T00:00:00+00:00</updated>
    <id>https://nicolas-brousse.fr/tags/ruby/atom.xml</id>
    <entry xml:lang="en">
        <title>Rack web profiler, first release</title>
        <published>2017-01-05T00:00:00+00:00</published>
        <updated>2017-01-05T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Nicolas B.
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nicolas-brousse.fr/articles/2017-01-05-rack-web-profiler-first-release/"/>
        <id>https://nicolas-brousse.fr/articles/2017-01-05-rack-web-profiler-first-release/</id>
        
        <content type="html" xml:base="https://nicolas-brousse.fr/articles/2017-01-05-rack-web-profiler-first-release/">&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.d24274c63f336b3d.jpg&quot; alt=&quot;&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.d24274c63f336b3d.jpg&quot;
     width=&quot;1280&quot; height=&quot;512&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.905700c61bd5ac91.jpg 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.80a8b9609a1cb72f.jpg 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.79cb51623f09ab39.jpg 1280w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.7662f681c5f218d5.jpg 1920w&quot;
     loading=&quot;lazy&quot;&gt;
&lt;p&gt;It’s been more than a year since I introduced one of my projects named Rack Web Profiler.&lt;&#x2F;p&gt;
&lt;p&gt;These last months I worked to stabilise, clean the project and also export the part linked to Rails onto a separate gem.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;why-this-gem&quot;&gt;Why this gem&lt;a class=&quot;post-anchor&quot; href=&quot;#why-this-gem&quot; aria-label=&quot;Anchor link for: why-this-gem&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;I know there is existing tools to develop and debug Rack and Rails applications like the gem &lt;code&gt;rack-miniprofiler&lt;&#x2F;code&gt;. But they have some elements missing to allow customisation and easy extension.&lt;br &#x2F;&gt;
That’s why I started creating this gem.&lt;&#x2F;p&gt;
&lt;p&gt;With Rack Web Profiler you have the ability to create custom collectors by using its DSL. It allows you to collect informations then show them on the bar and the panel.
All datas collected are stored in an SQLite database so you have access to the requests history.&lt;&#x2F;p&gt;
&lt;p&gt;For now these two gems are just bases but it could be something more in the future.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;ui-preview&quot;&gt;UI preview&lt;a class=&quot;post-anchor&quot; href=&quot;#ui-preview&quot; aria-label=&quot;Anchor link for: ui-preview&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;I worked with &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;thomasdecicco.me&quot;&gt;Thomas De Cicco&lt;&#x2F;a&gt; a digital designer on the UI of the profiler. We tried together to have something light, simple and readable.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-bar&quot;&gt;The bar&lt;a class=&quot;post-anchor&quot; href=&quot;#the-bar&quot; aria-label=&quot;Anchor link for: the-bar&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;It gives you quick informations about the current request. By clicking an element you can access more informations on the panel.&lt;&#x2F;p&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;bar.232ef3050c4b5d42.png&quot; alt=&quot;Bar&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;bar.232ef3050c4b5d42.png&quot;
     width=&quot;1280&quot; height=&quot;850&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;bar.87e22354245cf2df.png 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;bar.658c4402a8447cad.png 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;bar.24a819cbd74b7154.png 1280w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;bar.472c3c9206a69349.png 1920w&quot;
     loading=&quot;lazy&quot;&gt;
&lt;h3 id=&quot;the-panel&quot;&gt;The panel&lt;a class=&quot;post-anchor&quot; href=&quot;#the-panel&quot; aria-label=&quot;Anchor link for: the-panel&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;It shows you collectors details for a captured request.&lt;br &#x2F;&gt;
You also have a page that gives you the previous requests.&lt;&#x2F;p&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;panel.5178283c3eba433e.png&quot; alt=&quot;Panel&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;panel.5178283c3eba433e.png&quot;
     width=&quot;1280&quot; height=&quot;850&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;panel.a088e06431c6fdb9.png 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;panel.626bb3207f0d69bc.png 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;panel.f58f5386f70180f7.png 1280w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;panel.206715c49b33af28.png 1920w&quot;
     loading=&quot;lazy&quot;&gt;
&lt;h2 id=&quot;how-to-use-it&quot;&gt;How to use it&lt;a class=&quot;post-anchor&quot; href=&quot;#how-to-use-it&quot; aria-label=&quot;Anchor link for: how-to-use-it&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;I worked to have something which works with as less configuration as possible. But the gem will come with the possibility of having some options to configure it as you like.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;rack-rack-webprofiler&quot;&gt;Rack → &lt;code&gt;rack-webprofiler&lt;&#x2F;code&gt;&lt;a class=&quot;post-anchor&quot; href=&quot;#rack-rack-webprofiler&quot; aria-label=&quot;Anchor link for: rack-rack-webprofiler&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;With &lt;code&gt;rack&lt;&#x2F;code&gt; you need to add the profiler in the middleware like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span&gt;home&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt; lambda&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; |&lt;&#x2F;span&gt;&lt;span&gt;_env&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;|&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;  [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;200&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;Content-Type&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;text&#x2F;html&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; }&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;Hello world!&amp;lt;&#x2F;body&amp;gt;&amp;lt;&#x2F;html&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 3&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 5&lt;&#x2F;span&gt;&lt;span&gt;builder&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt; Rack&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;Builder&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;new&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 6&lt;&#x2F;span&gt;&lt;span&gt;  use &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;Rack&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;WebProfiler&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 7&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;  map&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; {&lt;&#x2F;span&gt;&lt;span&gt; run home &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 9&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;10&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;11&lt;&#x2F;span&gt;&lt;span&gt;run builder&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;By default it will use &lt;code&gt;Dir.tmpdir&lt;&#x2F;code&gt; to define the temporary directory (place where the database is created). You could configure it by using the &lt;code&gt;tmp_dir:&lt;&#x2F;code&gt; option.&lt;&#x2F;p&gt;
&lt;p&gt;To see more you can go to the &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rack-webprofiler&#x2F;rack-webprofiler&quot;&gt;GitHub&lt;&#x2F;a&gt; project.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;rails-rails-webprofiler&quot;&gt;Rails → &lt;code&gt;rails-webprofiler&lt;&#x2F;code&gt;&lt;a class=&quot;post-anchor&quot; href=&quot;#rails-rails-webprofiler&quot; aria-label=&quot;Anchor link for: rails-rails-webprofiler&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;For Rails the gem only contains specific collectors. It includes the &lt;code&gt;rack-webprofiler&lt;&#x2F;code&gt; gem to have the bar and panel.
It uses Railtie to automatically load the profiler in the middleware. So you only have to add one gem to the Gemfile as following:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Gemfile&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gem &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;rails-webprofiler&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;It uses the Rails temporary directory as &lt;code&gt;tmp_dir&lt;&#x2F;code&gt; for the database place.&lt;&#x2F;p&gt;
&lt;p&gt;To see more you can go to the &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rack-webprofiler&#x2F;rails-webprofiler&quot;&gt;GitHub&lt;&#x2F;a&gt; project.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;sinatra&quot;&gt;Sinatra&lt;a class=&quot;post-anchor&quot; href=&quot;#sinatra&quot; aria-label=&quot;Anchor link for: sinatra&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;For now there is nothing for Sinatra but I plan working on a &lt;code&gt;sinatra-webprofiler&lt;&#x2F;code&gt; gem in the future if there are requests.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;how-to-extend-it&quot;&gt;How to extend it&lt;a class=&quot;post-anchor&quot; href=&quot;#how-to-extend-it&quot; aria-label=&quot;Anchor link for: how-to-extend-it&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Like I said I worked to have something extendable easily. I created a DSL with methods to give you access to the tools you needs.&lt;&#x2F;p&gt;
&lt;p&gt;Here is an example of the time collector.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;class&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt; TimeCollector&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Just include the DSL.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 3&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;  include&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt; Rack&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;WebProfiler&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;Collector&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;DSL&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 5&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Base64 icon (using svg icon is better).&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 6&lt;&#x2F;span&gt;&lt;span&gt;  icon &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;lt;&amp;lt;-&amp;#39;ICON&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 7&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;data:image&#x2F;svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+ICAgICAgICA8dGl0bGU+R3JvdXAgMjwvdGl0bGU+ICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiAgICA8ZGVmcz48L2RlZnM+ICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgICAgICAgPGcgaWQ9IkRlc2t0b3AtMiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEwLjAwMDAwMCwgLTE3MC4wMDAwMDApIiBmaWxsPSIjNTg1NDczIj4gICAgICAgICAgICA8ZyBpZD0iUGVyZm9ybWFuY2UiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAuMDAwMDAwLCAxNjAuMDAwMDAwKSI+ICAgICAgICAgICAgICAgIDxnIGlkPSJHcm91cC0yIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMC4wMDAwMDAsIDEwLjAwMDAwMCkiPiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTEwLDE4IEwxMCwxOCBDMTQuNDE4Mjc4LDE4IDE4LDE0LjQxODI3OCAxOCwxMCBDMTgsNS41ODE3MjIgMTQuNDE4Mjc4LDIgMTAsMiBDNS41ODE3MjIsMiAyLDUuNTgxNzIyIDIsMTAgQzIsMTQuNDE4Mjc4IDUuNTgxNzIyLDE4IDEwLDE4IEwxMCwxOCBMMTAsMTggWiBNMCwxMCBDMCw0LjQ3NzE1MjUgNC40NzcxNTI1LDAgMTAsMCBDMTUuNTIyODQ3NSwwIDIwLDQuNDc3MTUyNSAyMCwxMCBDMjAsMTUuNTIyODQ3NSAxNS41MjI4NDc1LDIwIDEwLDIwIEM0LjQ3NzE1MjUsMjAgMCwxNS41MjI4NDc1IDAsMTAgWiIgaWQ9IlNoYXBlIj48L3BhdGg+ICAgICAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLTQzIiB4PSI5IiB5PSI0IiB3aWR0aD0iMiIgaGVpZ2h0PSI1Ij48L3JlY3Q+ICAgICAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLTQzLUNvcHkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE0LjAwMDAwMCwgMTAuMDAwMDAwKSByb3RhdGUoLTI3MC4wMDAwMDApIHRyYW5zbGF0ZSgtMTQuMDAwMDAwLCAtMTAuMDAwMDAwKSAiIHg9IjEzIiB5PSI4IiB3aWR0aD0iMiIgaGVpZ2h0PSI0Ij48L3JlY3Q+ICAgICAgICAgICAgICAgIDwvZz4gICAgICAgICAgICA8L2c+ICAgICAgICA8L2c+ICAgIDwvZz48L3N2Zz4=&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;ICON&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 9&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;10&lt;&#x2F;span&gt;&lt;span&gt;  identifier &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;time&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; identifier is used as database key and in css.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;11&lt;&#x2F;span&gt;&lt;span&gt;  label      &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;Time&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; label is used as text in the panel sidebar.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;12&lt;&#x2F;span&gt;&lt;span&gt;  position   &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;3&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;      #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; position of the element in the bar and panel sidebar.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;13&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;14&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Collect the data you need to store for the view.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;15&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; You access to the request and response objects (they are not the originals).&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;16&lt;&#x2F;span&gt;&lt;span&gt;  collect &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; |&lt;&#x2F;span&gt;&lt;span&gt;request&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; _response&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;|&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;17&lt;&#x2F;span&gt;&lt;span&gt;    runtime&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; request&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;env&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;WebProfiler&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;ENV_RUNTIME&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; *&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; 1000.0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;18&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;19&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;    #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Store by key the data you need access in the view.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;20&lt;&#x2F;span&gt;&lt;span&gt;    store &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;runtime&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; runtime&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;21&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;22&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;    #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; You could set a color status to the bar item.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;23&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;    #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Possible values: `:warning`, `:danger`, `:success`&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;24&lt;&#x2F;span&gt;&lt;span&gt;    status &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;warning&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; if&lt;&#x2F;span&gt;&lt;span&gt; runtime &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; 200&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;25&lt;&#x2F;span&gt;&lt;span&gt;    status &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;danger&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;  if&lt;&#x2F;span&gt;&lt;span&gt; runtime &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; 1000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;26&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;27&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;    #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; You could conditionally show or hide panel and bar.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;28&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;    #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; By default they are shown if they exist in the view.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;29&lt;&#x2F;span&gt;&lt;span&gt;    show_panel &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;30&lt;&#x2F;span&gt;&lt;span&gt;    show_bar   &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;31&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;  end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;32&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;33&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; There is two ways to store the ERB template. Here we store view content&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;34&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; in the same file as the collector.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;35&lt;&#x2F;span&gt;&lt;span&gt;  template &lt;&#x2F;span&gt;&lt;span&gt;__FILE__&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt; type&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; :&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;DATA&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;36&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; But you could put it into a separate file like this:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;37&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; template &amp;quot;..&#x2F;template_folder&#x2F;template_file.erb&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;38&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;39&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;40&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;__END__&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;41&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;%&lt;&#x2F;span&gt;&lt;span&gt; tab_content &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; %&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;42&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;  &amp;lt;%= data(:runtime).round(2) %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; ms&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;43&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; end&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; %&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Or if it was in a separate file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;erb&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;&amp;lt;!--&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; tab_content block just contains the tab content &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;--&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%&lt;&#x2F;span&gt;&lt;span&gt; tab_content &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 3&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  &amp;lt;!--&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; use data method to get the values you stored by key &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;--&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 4&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;  &amp;lt;%=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt; data&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;runtime&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;round&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;2&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; ms&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 5&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; end&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 6&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 7&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;&amp;lt;!--&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; panel_content block contains the panel content &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;--&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;&amp;lt;!--&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; but here we don&amp;#39;t need to show it &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;--&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 9&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%&lt;&#x2F;span&gt;&lt;span&gt; panel_content &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;10&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  &amp;lt;!--&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Your pretty HTML code &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;--&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;11&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; end&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;After creating the collector, you simply need to register it as following:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;Rack&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;WebProfiler&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;register_collector&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; TimeCollector&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Registration can’t be done dynamically in your application code. If you don’t always need to show a collector, you have to use the &lt;code&gt;is_enabled?&lt;&#x2F;code&gt; DSL method.&lt;&#x2F;p&gt;
&lt;p&gt;If you need more details, you have a &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rack-webprofiler&#x2F;rack-webprofiler&#x2F;blob&#x2F;master&#x2F;docs&#x2F;DSL.md&quot;&gt;documentation for the DSL&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Voilà, you have your first collector!&lt;&#x2F;p&gt;
&lt;h2 id=&quot;next-steps&quot;&gt;Next steps&lt;a class=&quot;post-anchor&quot; href=&quot;#next-steps&quot; aria-label=&quot;Anchor link for: next-steps&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;The Rack WebProfiler will have some other functionalities in the future. Like being able to toggle the bar, have a search form for the requests list and catch the exceptions to show the informations into the panel.&lt;br &#x2F;&gt;
I also plan to create some other collectors for Rails like I18n, ActiveMailer and ActiveJob collectors.&lt;&#x2F;p&gt;
&lt;p&gt;If you have any feedback, comment or idea of contribution, &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rack-webprofiler&#x2F;rack-webprofiler&#x2F;issues&#x2F;new&quot;&gt;github&lt;&#x2F;a&gt;!&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;Sources:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rack-webprofiler&#x2F;rack-webprofiler&quot;&gt;Rack WebProfiler GitHub repository&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rack-webprofiler&#x2F;rails-webprofiler&quot;&gt;Rails WebProfiler GitHub repository&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Test #1 — Use Sidekiq on a separate servers</title>
        <published>2015-07-15T00:00:00+00:00</published>
        <updated>2015-07-15T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Nicolas B.
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nicolas-brousse.fr/articles/2015-07-15-test-1-sidekiq-on-separate-servers/"/>
        <id>https://nicolas-brousse.fr/articles/2015-07-15-test-1-sidekiq-on-separate-servers/</id>
        
        <content type="html" xml:base="https://nicolas-brousse.fr/articles/2015-07-15-test-1-sidekiq-on-separate-servers/">&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.361201b45685ca07.jpg&quot; alt=&quot;&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.361201b45685ca07.jpg&quot;
     width=&quot;1280&quot; height=&quot;512&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.97e7b0ea090816f9.jpg 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.f7e1b98d978384fc.jpg 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.36c72b2d3bddf572.jpg 1280w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.66d3022e3055f746.jpg 1920w&quot;
     loading=&quot;lazy&quot;&gt;
&lt;p&gt;These last days I tried to use Sidekiq on different servers than the Rails app one.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;first-what-is-sidekiq&quot;&gt;First, What is Sidekiq?&lt;a class=&quot;post-anchor&quot; href=&quot;#first-what-is-sidekiq&quot; aria-label=&quot;Anchor link for: first-what-is-sidekiq&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;sidekiq.org&#x2F;&quot;&gt;Sidekiq&lt;&#x2F;a&gt; is a &lt;q&gt;Simple, efficient background processing for Ruby&lt;&#x2F;q&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;With more words, it’s a library who allows you to create job classes. A job contains the code pieces you want to perform later. It’s a kind of code decentralization.&lt;&#x2F;p&gt;
&lt;p&gt;And in this test the goal is to try running the job in different server than the web server.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;why&quot;&gt;Why?&lt;a class=&quot;post-anchor&quot; href=&quot;#why&quot; aria-label=&quot;Anchor link for: why&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Why is it better to separate worker of web server?&lt;br &#x2F;&gt;
Imagine you need to do processes, so you use memory and CPU. In this case that means you take web server resources. So your web app could be slower.&lt;&#x2F;p&gt;
&lt;p&gt;By using different servers, it uses separate server resources. If process needs time, it takes the time it needs. And you could eventually decide to use a bigger server later.&lt;br &#x2F;&gt;
So it’s just easier to scale web and worker servers separately with you VPS or cloud hosting provider.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-in-pictures&quot;&gt;Test in pictures&lt;a class=&quot;post-anchor&quot; href=&quot;#test-in-pictures&quot; aria-label=&quot;Anchor link for: test-in-pictures&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;To do this test I used &lt;strong&gt;Vagrant&lt;&#x2F;strong&gt; with 3 VMs. One for the Rails &lt;code&gt;web&lt;&#x2F;code&gt; server and two others for Sidekiq named &lt;code&gt;worker-01&lt;&#x2F;code&gt; + &lt;code&gt;worker-02&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;For the Rails app code I simply used the one of the &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;railscasts.com&#x2F;episodes&#x2F;366-sidekiq&#x2F;&quot;&gt;Railscast #366&lt;&#x2F;a&gt; by &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;twitter.com&#x2F;rbates&quot;&gt;Ryan Bates&lt;&#x2F;a&gt;.&lt;br &#x2F;&gt;
I only converted the Sidekiq worker into a Rails ActiveJob.&lt;&#x2F;p&gt;
&lt;p&gt;The example is a simple snippets application.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;1-set-data-into-form&quot;&gt;1. Set data into form&lt;a class=&quot;post-anchor&quot; href=&quot;#1-set-data-into-form&quot; aria-label=&quot;Anchor link for: 1-set-data-into-form&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-1.5caa85a74a167c37.png&quot; alt=&quot;Form&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-1.5caa85a74a167c37.png&quot;
     width=&quot;1280&quot; height=&quot;769&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-1.d4f8f22f617575a0.png 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-1.158211d3b5011337.png 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-1.d01f5346399f5f5f.png 1280w&quot;
     loading=&quot;lazy&quot;&gt;

This is the “homepage” and also the form to send the code of our snippet.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;2-after-data-posted&quot;&gt;2. After data posted&lt;a class=&quot;post-anchor&quot; href=&quot;#2-after-data-posted&quot; aria-label=&quot;Anchor link for: 2-after-data-posted&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-2.b8058e4222d8dfc0.png&quot; alt=&quot;Datas posted&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-2.b8058e4222d8dfc0.png&quot;
     width=&quot;1280&quot; height=&quot;769&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-2.f040a6b1f5330880.png 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-2.7112e5b930798a61.png 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-2.ba6af315ed7ab9f1.png 1280w&quot;
     loading=&quot;lazy&quot;&gt;

After posted our snippet we could see the code. Currently the code is still raw. We have to wait the job is processed.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;3-after-worker-processed&quot;&gt;3. After worker processed&lt;a class=&quot;post-anchor&quot; href=&quot;#3-after-worker-processed&quot; aria-label=&quot;Anchor link for: 3-after-worker-processed&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-3.f54a079b6fec2af4.png&quot; alt=&quot;Datas processed&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-3.f54a079b6fec2af4.png&quot;
     width=&quot;1280&quot; height=&quot;769&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-3.3862dc1d604ccc56.png 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-3.03e13d6274eae6fe.png 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-3.c18ac9026c45f6f4.png 1280w&quot;
     loading=&quot;lazy&quot;&gt;

Now the worker processed the job. The code is full of colors.
And we could see that the IP is a different one and the hostname as well.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;4-retry-a-new-once&quot;&gt;4. Retry a new once&lt;a class=&quot;post-anchor&quot; href=&quot;#4-retry-a-new-once&quot; aria-label=&quot;Anchor link for: 4-retry-a-new-once&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-4.3a61260042689898.png&quot; alt=&quot;Datas posted after retry&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-4.3a61260042689898.png&quot;
     width=&quot;1280&quot; height=&quot;769&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-4.aee7a18c4fb16c1d.png 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-4.589dabdcfa2e769f.png 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-4.5e432d0ac2eb2c80.png 1280w&quot;
     loading=&quot;lazy&quot;&gt;

In my example I instantiate two worker servers. So I do others tests.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;5-after-worker-processed-on-a-different-worker&quot;&gt;5. After worker processed on a different worker&lt;a class=&quot;post-anchor&quot; href=&quot;#5-after-worker-processed-on-a-different-worker&quot; aria-label=&quot;Anchor link for: 5-after-worker-processed-on-a-different-worker&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-5.c4445e56f8f62b24.png&quot; alt=&quot;Datas processed after retry&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-5.c4445e56f8f62b24.png&quot;
     width=&quot;1280&quot; height=&quot;769&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-5.8cf6ec6647795d01.png 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-5.084cb7c5f5f974c4.png 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-5.8aee9c879fbccff4.png 1280w&quot;
     loading=&quot;lazy&quot;&gt;

In this new test the IP is not the same than the other time. It’s not the same worker server who processed the job.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;sidekiq-admin&quot;&gt;Sidekiq admin&lt;a class=&quot;post-anchor&quot; href=&quot;#sidekiq-admin&quot; aria-label=&quot;Anchor link for: sidekiq-admin&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-6.293292b93cf5dceb.png&quot; alt=&quot;Sidekiq admin&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-6.293292b93cf5dceb.png&quot;
     width=&quot;1280&quot; height=&quot;770&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-6.c8505d5a98fff9ad.png 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-6.a467c4167ea4ea00.png 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-6.4571224d643b8eb9.png 1280w&quot;
     loading=&quot;lazy&quot;&gt;

We have the list of the Sidekiq processes who are working. The two (or more) workers are listed here :)&lt;&#x2F;p&gt;
&lt;h2 id=&quot;serveurs-configuration&quot;&gt;Serveurs configuration&lt;a class=&quot;post-anchor&quot; href=&quot;#serveurs-configuration&quot; aria-label=&quot;Anchor link for: serveurs-configuration&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Let see with scheme how it looks for the servers configuration.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;my-current-test-with-vagrant&quot;&gt;My current test with Vagrant&lt;a class=&quot;post-anchor&quot; href=&quot;#my-current-test-with-vagrant&quot; aria-label=&quot;Anchor link for: my-current-test-with-vagrant&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;For the test I did with Vagrant, it looked like this.&lt;&#x2F;p&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;configuration-vagrant.a9d5e3078aa8ccd5.png&quot; alt=&quot;Vagrant configuration&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;configuration-vagrant.a9d5e3078aa8ccd5.png&quot;
     width=&quot;661&quot; height=&quot;469&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;configuration-vagrant.e6d0cd7b8cc2dd05.png 640w&quot;
     loading=&quot;lazy&quot;&gt;
&lt;p&gt;So we have the &lt;code&gt;web&lt;&#x2F;code&gt; server who also contains the Redis server and the Rails app. Because this is a test, I run the application in development mode with Rack.
The application is exactly the same used for the 3 servers. So I used an Sqlite as a file for simplicity.&lt;&#x2F;p&gt;
&lt;p&gt;For the &lt;code&gt;worker&lt;&#x2F;code&gt;s it uses the same Redis server and database. And I run the Sidekiq root process as a daemon.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;production-example&quot;&gt;Production example&lt;a class=&quot;post-anchor&quot; href=&quot;#production-example&quot; aria-label=&quot;Anchor link for: production-example&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;So, what about a production configuration? It could be something like this.&lt;&#x2F;p&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;configuration-production-example.40a7cfc01ee30012.png&quot; alt=&quot;Example of production configuration&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;configuration-production-example.40a7cfc01ee30012.png&quot;
     width=&quot;495&quot; height=&quot;908&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;&quot;
     loading=&quot;lazy&quot;&gt;
&lt;p&gt;And have separate &lt;code&gt;db&lt;&#x2F;code&gt; and &lt;code&gt;redis&lt;&#x2F;code&gt; servers. &lt;code&gt;web&lt;&#x2F;code&gt; servers only contain the application with the http server. If you want multiple &lt;code&gt;web&lt;&#x2F;code&gt; servers, you have to install a proxy server as HAProxy.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;code-sources&quot;&gt;Code sources&lt;a class=&quot;post-anchor&quot; href=&quot;#code-sources&quot; aria-label=&quot;Anchor link for: code-sources&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;If you want to test it, &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;nicolas-brousse&#x2F;1-sidekiq-separate-servers&quot;&gt;all the code is available on GitHub&lt;&#x2F;a&gt;.&lt;br &#x2F;&gt;
After clone or download you only have to install Vagrant (if you haven’t yet) and just &lt;code&gt;vagrant up&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Have fun 😄!&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;Sources:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;18265427&#x2F;is-it-possible-to-run-sidekiq-on-a-separate-host-from-the-rails-host&quot;&gt;Stackoverflow question about Sidekiq on separate server&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;docs.vagrantup.com&#x2F;v2&#x2F;multi-machine&#x2F;&quot;&gt;Vagrant multi-machine documentation&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;sidekiq.org&#x2F;&quot;&gt;Sidekiq website&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;railscasts.com&#x2F;episodes&#x2F;366-sidekiq&#x2F;&quot;&gt;‘Railscast #366 Sidekiq’&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;nicolas-brousse&#x2F;1-sidekiq-separate-servers&quot;&gt;Source code&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Rack web profiler</title>
        <published>2015-06-22T00:00:00+00:00</published>
        <updated>2015-06-22T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Nicolas B.
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nicolas-brousse.fr/articles/2015-06-22-rack-web-profiler/"/>
        <id>https://nicolas-brousse.fr/articles/2015-06-22-rack-web-profiler/</id>
        
        <content type="html" xml:base="https://nicolas-brousse.fr/articles/2015-06-22-rack-web-profiler/">&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.3e3d09ed84d251a0.jpg&quot; alt=&quot;&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.3e3d09ed84d251a0.jpg&quot;
     width=&quot;1280&quot; height=&quot;512&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.abcabb6c5edaf13b.jpg 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.deca489ff68d13d1.jpg 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.5243bad4f85cd63a.jpg 1280w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.4ea80151b3d345c1.jpg 1920w&quot;
     loading=&quot;lazy&quot;&gt;
&lt;p&gt;Before I started using Ruby, I coded mostly with PHP. Back then, I worked a lot with Symfony2 and its web profiler.&lt;br &#x2F;&gt;
I found it really nice and I’m surprised that nothing similar exists in Ruby and Ruby on Rails.
So I decided to create one.&lt;&#x2F;p&gt;
&lt;p&gt;I’m currently working on it. I mainly would like to provide a nice an simple DSL to allow everybody
to create and register their own collector(s).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;create-a-collector&quot;&gt;Create a collector&lt;a class=&quot;post-anchor&quot; href=&quot;#create-a-collector&quot; aria-label=&quot;Anchor link for: create-a-collector&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Until now I’m thinking about creating &lt;abbr title=&quot;Domain-Specific Language&quot; class=&quot;initialism&quot;&gt;DSL&lt;&#x2F;abbr&gt;&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-1-1&quot;&gt;&lt;a href=&quot;#fn-1&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt; like the examples right after.
As a lot of libraries and tools, it’s a nice way to allow externals extended.&lt;&#x2F;p&gt;
&lt;p&gt;To start prototyping I worked with classic classes. But I guess it’s a nice instant to move in a DSL way.
So, here are the two ways I think are interesting.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;dsl-with-template-file&quot;&gt;DSL with template file&lt;a class=&quot;post-anchor&quot; href=&quot;#dsl-with-template-file&quot; aria-label=&quot;Anchor link for: dsl-with-template-file&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;class&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt; MyCollector&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span&gt;  extends &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;WebProfiler&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;Collector&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;DSL&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 4&lt;&#x2F;span&gt;&lt;span&gt;  collector_name &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;my_collector&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Technical name of the collector.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 5&lt;&#x2F;span&gt;&lt;span&gt;  icon     &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;                   #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Base64 encoded image for the icon collector.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 6&lt;&#x2F;span&gt;&lt;span&gt;  position &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;                    #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Position of the collector in the toolbar.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 7&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Retrieve the env, the request and the response&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 9&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; to collect the needed information. Then save datas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;10&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; and show them in the profiler toolbar and panel.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;11&lt;&#x2F;span&gt;&lt;span&gt;  collect &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; |&lt;&#x2F;span&gt;&lt;span&gt;env&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; request&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; response&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;|&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;12&lt;&#x2F;span&gt;&lt;span&gt;    store &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;version&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt; MyApp&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;VERSION&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;13&lt;&#x2F;span&gt;&lt;span&gt;    store &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;list&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;value1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;value2&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;14&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;  end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;15&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;16&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; The path of the collector template.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;17&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; May be with some options to know if we show the collector&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;18&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; on tab and&#x2F;or panel.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;19&lt;&#x2F;span&gt;&lt;span&gt;  template &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;..&#x2F;path&#x2F;to&#x2F;template.erb&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt; tab&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; false&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt; panel&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;20&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;21&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; To know if the collector must be enabled.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;22&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Usefull to load collector only if a gem is installed.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;23&lt;&#x2F;span&gt;&lt;span&gt;  is_enabled? &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;defined?&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; MyApp&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;24&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The &lt;code&gt;erb&lt;&#x2F;code&gt; template could look like this. By using the &lt;code&gt;content_for&lt;&#x2F;code&gt; method.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;erb&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%&lt;&#x2F;span&gt;&lt;span&gt; content_for &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;tab&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; do&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  &amp;lt;!--&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Here the tab content &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;--&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 4&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;  &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;div&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);&quot;&gt; class&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;tab&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 5&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;    &amp;lt;%=&lt;&#x2F;span&gt;&lt;span&gt; data&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;version&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 6&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 7&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;    &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;div&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);&quot;&gt; class&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;pane&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;      &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;ul&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 9&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;      &amp;lt;%&lt;&#x2F;span&gt;&lt;span&gt; data&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;list&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;each&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; do&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; |&lt;&#x2F;span&gt;&lt;span&gt;item&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;10&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;        &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;li&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%=&lt;&#x2F;span&gt;&lt;span&gt; item &lt;&#x2F;span&gt;&lt;span&gt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;li&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;11&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;      &amp;lt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; end&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;12&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;      &amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;ul&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;13&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;    &amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;div&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;14&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;  &amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;div&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;15&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; end&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;16&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;17&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%&lt;&#x2F;span&gt;&lt;span&gt; content_for &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;panel&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; do&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;18&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  &amp;lt;!--&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Here the tab &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;--&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;19&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;20&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;  &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;div&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);&quot;&gt; class&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;panel&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;21&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;    &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;ul&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;22&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;    &amp;lt;%&lt;&#x2F;span&gt;&lt;span&gt; data&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;list&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;each&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; do&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; |&lt;&#x2F;span&gt;&lt;span&gt;item&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;23&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;      &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;li&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%=&lt;&#x2F;span&gt;&lt;span&gt; item &lt;&#x2F;span&gt;&lt;span&gt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;li&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;24&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;    &amp;lt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; end&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;25&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;    &amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;ul&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;26&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;  &amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;div&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;27&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; end&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;100-dsl&quot;&gt;100% DSL&lt;a class=&quot;post-anchor&quot; href=&quot;#100-dsl&quot; aria-label=&quot;Anchor link for: 100-dsl&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;I’m not sure yet about the template part. It might be better to
have DSL methods into the collector instead of a template.&lt;br &#x2F;&gt;
With something like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;class&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt; MyCollector&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span&gt;  extends &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;WebProfiler&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;Collector&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;DSL&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 4&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;  .&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 5&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 6&lt;&#x2F;span&gt;&lt;span&gt;  tab_value &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 7&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;    &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;MyApp&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;  end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 9&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;10&lt;&#x2F;span&gt;&lt;span&gt;  tab_content &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;11&lt;&#x2F;span&gt;&lt;span&gt;    table &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;12&lt;&#x2F;span&gt;&lt;span&gt;      row &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;Version&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt; MyApp&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;VERSION&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;13&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;14&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;  end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;15&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;16&lt;&#x2F;span&gt;&lt;span&gt;  panel_content &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;17&lt;&#x2F;span&gt;&lt;span&gt;    div &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;18&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;      p&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;This is my app with version &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;#{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;MyApp&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;VERSION&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;19&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;20&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;  end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;21&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;register-a-collector&quot;&gt;Register a collector&lt;a class=&quot;post-anchor&quot; href=&quot;#register-a-collector&quot; aria-label=&quot;Anchor link for: register-a-collector&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;It’s nice to create a collector but we also have to register it. It’s why I prepared some code to allow it.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;into-an-app&quot;&gt;Into an app&lt;a class=&quot;post-anchor&quot; href=&quot;#into-an-app&quot; aria-label=&quot;Anchor link for: into-an-app&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;Then with the collector the idea is just to register it as this.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;ruby&quot; data-name=&quot;config&#x2F;initializers&#x2F;web_profiler.rb&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;WebProfiler&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;register_collector&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; MyCollector&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;3&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; or&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;5&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;WebProfiler&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;config&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; do&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; |&lt;&#x2F;span&gt;&lt;span&gt;c&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;|&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;6&lt;&#x2F;span&gt;&lt;span&gt;  c&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;add_collector&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; MyCollector&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;7&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;into-a-gem&quot;&gt;Into a gem&lt;a class=&quot;post-anchor&quot; href=&quot;#into-a-gem&quot; aria-label=&quot;Anchor link for: into-a-gem&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;But also it allow gems to contain their own collector(s).&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;ruby&quot; data-name=&quot;lib&#x2F;my_gem.rb&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; defined?&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; WebProfiler&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;2&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;  WebProfiler&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;register_collector&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; MyCollector&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;3&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;a class=&quot;post-anchor&quot; href=&quot;#conclusion&quot; aria-label=&quot;Anchor link for: conclusion&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;In my opinion the template file is nicer to management html. At least if the html to generate is big.&lt;br &#x2F;&gt;
But have the content into the collector class is simpler because we only have one file.&lt;&#x2F;p&gt;
&lt;p&gt;I will inform you of the progression.&lt;&#x2F;p&gt;
&lt;section class=&quot;footnotes&quot;&gt;
&lt;ol class=&quot;footnotes-list&quot;&gt;
&lt;li id=&quot;fn-1&quot;&gt;
&lt;p&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Domain-specific_language&quot;&gt;DSL wikipedia page&lt;&#x2F;a&gt; &lt;a href=&quot;#fr-1-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;section&gt;
</content>
        
    </entry>
</feed>
