<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>6. Instrumenting with client libraries on Prometheus Basics Training</title><link>/docs/06/</link><description>Recent content in 6. Instrumenting with client libraries on Prometheus Basics Training</description><generator>Hugo</generator><language>en-us</language><atom:link href="/docs/06/index.xml" rel="self" type="application/rss+xml"/><item><title>6.1 Tasks: Instrumenting</title><link>/docs/06/labs/61/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/06/labs/61/</guid><description>&lt;h3 id="task-611-get-the-source-code"&gt;Task 6.1.1: Get the source code&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git clone https://github.com/acend/prometheus-training-go-instrumentation.git
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Change into the freshly cloned git repository&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cd prometheus-training-go-instrumentation
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;TODO: create Dockerfile
This application creates a simple webserver which listens at &lt;code&gt;http://localhost:8083&lt;/code&gt; and returns the string &lt;code&gt;Prometheus Training&lt;/code&gt; after a random interval between 0 and 1000 milliseconds. You can test the app by building it as a docker image using &lt;code&gt;docker build -t prometheus-training-go-instrumentation:local .&lt;/code&gt; and then running the built image using &lt;code&gt;docker run --rm -p 8083:8083 prometheus-training-go-instrumentation:local&lt;/code&gt;. You can then (in a separate terminal) issue a request using the command &lt;code&gt;curl http://localhost:8083&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>6.1 Tasks: Instrumenting</title><link>/docs/06/labs/61_baloise_springboot/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/06/labs/61_baloise_springboot/</guid><description>&lt;h3 id="task-611-spring-boot-example-instrumentation"&gt;Task 6.1.1: Spring Boot Example Instrumentation&lt;/h3&gt;
&lt;p&gt;Using the &lt;a href="https://spring.io/blog/2018/03/16/micrometer-spring-boot-2-s-new-application-metrics-collector" target="_blank" rel="noopener"&gt;micrometer metrics facade&lt;/a&gt;
 in Spring Boot Applications lets us collect all sort of metrics within a Spring Boot application. Those metrics can be exported for Prometheus to scrape by a few additional dependencies and configuration.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a deeper look at how the instrumentation of a Spring Boot application works. For that we can use the prometheus-training-spring-boot-example application located at &lt;a href="https://github.com/acend/prometheus-training-spring-boot-example" target="_blank" rel="noopener"&gt;https://github.com/acend/prometheus-training-spring-boot-example&lt;/a&gt;
. To make the application collect metrics and provide a Prometheus endpoint we now need to simply add the following two dependencies in the &lt;code&gt;pom.xml&lt;/code&gt; file, where it says &lt;code&gt;&amp;lt;!-- Add Dependencies here--&amp;gt;&lt;/code&gt;:&lt;/p&gt;</description></item><item><title>6.1 Tasks: Instrumenting</title><link>/docs/06/labs/61_springboot/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/06/labs/61_springboot/</guid><description>&lt;h3 id="task-611-spring-boot-example-instrumentation"&gt;Task 6.1.1: Spring Boot Example Instrumentation&lt;/h3&gt;
&lt;p&gt;Using the &lt;a href="https://spring.io/blog/2018/03/16/micrometer-spring-boot-2-s-new-application-metrics-collector" target="_blank" rel="noopener"&gt;micrometer metrics facade&lt;/a&gt;
 in Spring Boot Applications lets us collect all sort of metrics within a Spring Boot application. Those metrics can be exported for Prometheus to scrape by a few additional dependencies and configuration.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a deeper look at how the instrumentation of a Spring Boot application works. For that we can use the prometheus-training-spring-boot-example application located at &lt;a href="https://github.com/acend/prometheus-training-spring-boot-example" target="_blank" rel="noopener"&gt;https://github.com/acend/prometheus-training-spring-boot-example&lt;/a&gt;
. To make the application collect metrics and provide a Prometheus endpoint we now need to simply add the following two dependencies in the &lt;code&gt;pom.xml&lt;/code&gt; file, where it says &lt;code&gt;&amp;lt;!-- Add Dependencies here--&amp;gt;&lt;/code&gt;:&lt;/p&gt;</description></item></channel></rss>