<?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</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">Task 6.1.1: Get the source code&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>git clone https://github.com/acend/prometheus-training-go-instrumentation.git
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Change into the freshly cloned git repository&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>cd prometheus-training-go-instrumentation
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>TODO: create Dockerfile
This application creates a simple webserver which listens at &lt;code>http://localhost:8083&lt;/code> and returns the string &lt;code>Prometheus Training&lt;/code> after a random interval between 0 and 1000 milliseconds. You can test the app by building it as a docker image using &lt;code>docker build -t prometheus-training-go-instrumentation:local .&lt;/code> and then running the built image using &lt;code>docker run --rm -p 8083:8083 prometheus-training-go-instrumentation:local&lt;/code>. You can then (in a separate terminal) issue a request using the command &lt;code>curl http://localhost:8083&lt;/code>.&lt;/p></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">Task 6.1.1: Spring Boot Example Instrumentation&lt;/h3>
&lt;p>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">micrometer metrics facade&lt;/a>
 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>
&lt;p>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">https://github.com/acend/prometheus-training-spring-boot-example&lt;/a>
. 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>pom.xml&lt;/code> file, where it says &lt;code>&amp;lt;!-- Add Dependencies here--&amp;gt;&lt;/code>:&lt;/p></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">Task 6.1.1: Spring Boot Example Instrumentation&lt;/h3>
&lt;p>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">micrometer metrics facade&lt;/a>
 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>
&lt;p>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">https://github.com/acend/prometheus-training-spring-boot-example&lt;/a>
. 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>pom.xml&lt;/code> file, where it says &lt;code>&amp;lt;!-- Add Dependencies here--&amp;gt;&lt;/code>:&lt;/p></description></item></channel></rss>