<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="372312" data-post-id="372312">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="pepicrft" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/pepicrft/120/31270_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  pepicrft
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks a lot <a class="mention" href="/u/rkallos" rel="nofollow">@rkallos</a> for this amazing libary. I made it the storage for our <code>:prom_ex</code>-based setup and it works like a charm. May I pick your brin for a second?</p>
<p>If Peep keeps the data in memory and ready to be pulled through a <code>/metrics</code> endpoint, when is the data cleaned up? Is thre some periodic system that does the clean up, or does it expect deployments to happen continuously such that it never reaches that point where it uses most of the system memory?</p>
<p>Also, would you recommend having multiple cores in production? We have a single one because our app is very IO-bound, and I noticed that different HTTP connection pools started showing timeouts, which I believe are connected with the CPU being busy processing data for Prometheus. I disabled the <code>:prom_ex</code> setup for a few days to confirm this.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="372312" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/peep-efficient-telemetrymetrics-reporter-supporting-prometheus-and-statsd/55901/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-372312" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="372312"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="372328" data-post-id="372328">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="josevalim" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/120/1787_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  josevalim
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Elixir</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I would say you always want multiple cores because Elixir do a better job at multiplexing IO/CPU payloads than a load balancer that works purely at the request level. <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="372328" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/peep-efficient-telemetrymetrics-reporter-supporting-prometheus-and-statsd/55901/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-372328" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="372328"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="372330" data-post-id="372330">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="rkallos" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/rkallos/120/30622_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  rkallos
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Good questions!</p>
<blockquote>
<p>when is the data cleaned up?</p>
</blockquote>
<p>Peep’s storage is bounded by the set of metrics passed it on startup and the set of unique label values for those metrics. It is generally recommended that label values are bound by the application, so Peep’s memory usage eventually converges to a steady point.</p>
<p>That said, the ability to prune metrics containing specific label values from Peep was implemented and released with Peep v3.5.0. <code>Peep.prune_tags/2</code> can help in the specific use-case where, for example, metrics are tagged with a tenant id, and the system knows that the tenant has gone offline.</p>
<p>If you do find that Peep’s memory usage keeps climbing (which you can observe with a last_value metric on the <code>[:peep, :storage]</code> event), you may want to limit the label values you accept from certain metrics through the <code>:tags</code> and/or <code>:tag_values</code> options for a metric.</p>
<p>As for running an application on multiple cores in production, I must agree with Jose. At $WORK, we run one of our applications on bare metal on 96 core servers.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="372330" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/peep-efficient-telemetrymetrics-reporter-supporting-prometheus-and-statsd/55901/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-372330" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="372330"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="382416" data-post-id="382416">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="rkallos" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/rkallos/120/30622_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  rkallos
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hello again, everyone!</p>
<p>Peep v4.3.0 was released today, and since it has been a while since I gave an update here, I thought I’d share what’s changed in Peep over the past few months.</p>
<h1><a name="p-382416-v410-1" class="anchor" href="#p-382416-v410-1" aria-label="Heading link" rel="nofollow"></a>v4.1.0</h1>
<ul>
<li>Thanks to <a class="mention" href="/u/hauleth" rel="nofollow">@hauleth</a>, Peep now emits a :telemetry event when reading storage size. This should remove some tedious boilerplate for those who wrote their own :telemetry_poller callbacks for reporting on Peep’s storage size.</li>
<li><a class="mention" href="/u/hauleth" rel="nofollow">@hauleth</a> contributed another change that should improve performance slightly; using a tuple instead of a map to access an ETS table in Peep.Storage.Striped.</li>
<li><a class="mention" href="/u/hauleth" rel="nofollow">@hauleth</a> also contributed some further performance improvements to Peep.Codegen, removing some runtime indirection overhead, and inlining a hot function by turning it into a macro.</li>
<li><a class="mention" href="/u/hauleth" rel="nofollow">@hauleth</a> added some much needed flexibility to Peep.Buckets.Custom, making it possible to pass in variables and the results of function calls in the list of buckets passed when invoking <code>use Peep.Buckets.Custom</code>. He also fine-tuned the threshold length that Peep.Buckets.Custom uses to decide between linear search and binary search for finding which index to increment.</li>
<li><a class="mention" href="/u/hauleth" rel="nofollow">@hauleth</a> also fixed some incorrect escaping, and made Peep’s Prometheus export text conform to OpenMetrics.</li>
<li>I added Dialyzer and Credo to the project, which are now run in CI.</li>
</ul>
<h1><a name="p-382416-v411-2" class="anchor" href="#p-382416-v411-2" aria-label="Heading link" rel="nofollow"></a>v4.1.1</h1>
<ul>
<li><a class="mention" href="/u/hauleth" rel="nofollow">@hauleth</a> added support for 2-ary callbacks for the <code>:keep</code> option in Telemetry.Metrics</li>
</ul>
<h1><a name="p-382416-v420-3" class="anchor" href="#p-382416-v420-3" aria-label="Heading link" rel="nofollow"></a>v4.2.0</h1>
<ul>
<li><a class="mention" href="/u/pepicrft" rel="nofollow">@pepicrft</a> fixed an issue where Peep’s Prometheus export would crash while trying to convert terms to strings that don’t implement the String.Chars protocol.</li>
</ul>
<h1><a name="p-382416-v421-4" class="anchor" href="#p-382416-v421-4" aria-label="Heading link" rel="nofollow"></a>v4.2.1</h1>
<ul>
<li><a class="mention" href="/u/v0idpwn" rel="nofollow">@v0idpwn</a> fixed an incorrect type spec.</li>
</ul>
<h1><a name="p-382416-v430-5" class="anchor" href="#p-382416-v430-5" aria-label="Heading link" rel="nofollow"></a>v4.3.0</h1>
<ul>
<li><a class="mention" href="/u/edgurgel" rel="nofollow">@edgurgel</a> made it possible for folks to provide their own implementations of Peep.Storage. He also made it possible to test these new implementations against the test suite Peep has been using internally. Maybe we’ll see some Peep.Storage modules implemented with NIFs someday!</li>
</ul> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="382416" data-batch-url="/posts/batch_likers">
                        11
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/peep-efficient-telemetrymetrics-reporter-supporting-prometheus-and-statsd/55901/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-382416" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="382416"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>