Skip to content

Commit

Permalink
Deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
tekul committed Apr 2, 2024
1 parent 32e3818 commit 7f0532f
Show file tree
Hide file tree
Showing 42 changed files with 132 additions and 131 deletions.
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
broch.tech
10 changes: 5 additions & 5 deletions index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ B: Clone + Send + Sync + Database<load_data(): Send> + 'static,
<pre><code class="language-rust">tracing_subscriber::fmt().init();
</code></pre>
<p>to your <code>main</code> function. If you are running a web application you can use integrations such as those for <a href="https://docs.rs/tracing-actix-web/latest/tracing_actix_web/">actix</a> or <a href="https://docs.rs/tower-http/latest/tower_http/trace/index.html">axum</a>, add some <a href="https://docs.rs/tracing/0.1.37/tracing/index.html#events-1">tracing events</a> to your code and you will see output in the console <sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>.</p>
<p>But you want more than console output, right? Tracing links the various “spans” and log events from a single HTTP request together and we want to see them collected in a dashboard so we can track what happened during each request, query the data and so on. At this point you might read about the <a href=""><code>tracing-opentelemetry</code></a> and <a href=""><code>opentelemetry</code></a> crates. The <code>opentelemetry</code> crate lists yet more crates which you can use to export traces to various backends. One of these is <a href="https://www.jaegertracing.io/">Jaeger</a> which is a popular open source tool, with a nice UI. You can easily run it locally using Docker, it’s often used in blog articles and many of the code samples on <code>crates.io</code> use it.</p>
<p>But you want more than console output, right? Tracing links the various “spans” and log events from a single HTTP request together and we want to see them collected in a dashboard so we can track what happened during each request, query the data and so on. At this point you might read about the <a href="https://crates.io/crates/tracing-opentelemetry"><code>tracing-opentelemetry</code></a> and <a href="https://crates.io/crates/opentelemetry"><code>opentelemetry</code></a> crates. The <code>opentelemetry</code> crate lists yet more crates which you can use to export traces to various backends. One of these is <a href="https://www.jaegertracing.io/">Jaeger</a> which is a popular open source tool, with a nice UI. You can easily run it locally using Docker, it’s often used in blog articles and many of the code samples on <code>crates.io</code> use it.</p>
<p>This is roughly where I was about a year ago. I was working on a system which I’d integrated with Rust <code>tracing</code> and copied one of those samples to export to Jaeger using the <a href="https://crates.io/crates/opentelemetry-jaeger"><code>opentelemetry-jaeger</code></a> crate. But ideally we wanted to provide a binary to users and allow them to choose their own telemetry backend. OpenTelemetry didn’t seem to be providing a lot of value if we had to compile against a different integration crate each time 🤔.</p>
<p>On revisiting this issue and doing a bit more research, I realised that OpenTelemetry defines <a href="https://opentelemetry.io/docs/reference/specification/protocol/">its own protocol</a>, OTLP (hence the “Open” 🙄), and that it is <em>directly supported</em> by Jaeger as well as by many <a href="https://opentelemetry.io/ecosystem/vendors/">commercial vendors</a>. In fact, Jaeger has now deprecated its own clients in favour of OTLP, so the <code>opentelemetry-jaeger</code> crate is really redundant.</p>
<p>This makes things much simpler. Hiding in that big list of OpenTelemetry crates is <a href="https://crates.io/crates/opentelemetry-otlp"><code>opentelemetry-otlp</code></a>. If we use that then hopefully our system will “just work” with these compatible backends.</p>
Expand Down
10 changes: 5 additions & 5 deletions page/2/index.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions posts/build-your-own-wai-framework/index.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions posts/double-slits-elm/index.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions posts/elm-have-i-been-pwned/index.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions posts/elm-zxcvbn/index.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions posts/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion posts/index.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Blog on broch.tech</title><link>https://broch.tech/posts/</link><description>Recent content in Blog on broch.tech</description><generator>Hugo -- gohugo.io</generator><language>en-gb</language><lastBuildDate>Thu, 25 Feb 2021 00:00:00 +0000</lastBuildDate><atom:link href="https://broch.tech/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>Trying out Rust's Async Functions in Traits</title><link>https://broch.tech/posts/rust-async-fn-trait/</link><pubDate>Thu, 31 Aug 2023 00:00:00 +0000</pubDate><guid>https://broch.tech/posts/rust-async-fn-trait/</guid><description>Async functions in traits have been available in Rust nightly releases for some time now behind the feature gate async_fn_in_trait. The current status is summarized in the Inside Rust blog. Many of the issues are also explained in more detail by Niko Matsakis in his Baby Steps blog.
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Blog on broch.tech</title><link>https://broch.tech/posts/</link><description>Recent content in Blog on broch.tech</description><generator>Hugo -- gohugo.io</generator><language>en-gb</language><lastBuildDate>Fri, 12 Jan 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://broch.tech/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>Trying out Rust's Async Functions in Traits</title><link>https://broch.tech/posts/rust-async-fn-trait/</link><pubDate>Thu, 31 Aug 2023 00:00:00 +0000</pubDate><guid>https://broch.tech/posts/rust-async-fn-trait/</guid><description>Async functions in traits have been available in Rust nightly releases for some time now behind the feature gate async_fn_in_trait. The current status is summarized in the Inside Rust blog. Many of the issues are also explained in more detail by Niko Matsakis in his Baby Steps blog.
I decided to try the feature out with some existing code which was using the async-trait library (which provides a workaround for stable Rust).</description></item><item><title>Flexible Tracing with Rust and OpenTelemetry OTLP</title><link>https://broch.tech/posts/rust-tracing-opentelemetry/</link><pubDate>Thu, 06 Apr 2023 00:00:00 +0000</pubDate><guid>https://broch.tech/posts/rust-tracing-opentelemetry/</guid><description>If you have been using log files all your life, the telemetry ecosytem can be a bit daunting for a newcomer. And if you&amp;rsquo;ve just discovered Rust&amp;rsquo;s tracing framework, it&amp;rsquo;s not immediately clear where to look beyond the basic examples. There are a lot of crates and APIs to get your head round and a lot of new terminology. This article isn&amp;rsquo;t intended to be a complete tutorial but will explain how to set up a configuration which works with multiple systems and hopefully provide some insight into how things fit together.</description></item><item><title>Checking Password Strength in Elm, Part 2: Have I Been Pwned API</title><link>https://broch.tech/posts/elm-have-i-been-pwned/</link><pubDate>Mon, 05 Mar 2018 00:00:00 +0000</pubDate><guid>https://broch.tech/posts/elm-have-i-been-pwned/</guid><description>In the Part 1, we used the Javascript library Zxcvn to check the strength of a password locally. Now we&amp;rsquo;ll extend the code to check the chosen password against the huge database maintained by Have I been pwned?. The code for this part is similar, but instead of decoding the result of a call to Javascript to obtain our data, we make an HTTP request and decode the response.
The full code for both parts can be found on github.</description></item><item><title>Checking Password Strength in Elm, Part 1: Zxcvbn</title><link>https://broch.tech/posts/elm-zxcvbn/</link><pubDate>Sun, 04 Mar 2018 00:00:00 +0000</pubDate><guid>https://broch.tech/posts/elm-zxcvbn/</guid><description>As part of a recent Elm project, I wrote some front-end user registration code which required that new users choose a password. I used the zxcvbn library to measure password strength and this seems like a good, non-trivial example to show how to call Javascript from Elm. In Part 2, we&amp;rsquo;ll look at how to add extra checks by calling the Have I Been Pwned passwords API which maintains a database of half a billion compromised password hashes.</description></item><item><title>Double-Slit Diffraction in Elm</title><link>https://broch.tech/posts/double-slits-elm/</link><pubDate>Mon, 02 Jan 2017 00:00:00 +0000</pubDate><guid>https://broch.tech/posts/double-slits-elm/</guid><description>I&amp;rsquo;ve been meaning to try Elm for some time and finally made the effort to write some code. It&amp;rsquo;s a demo of the double-slits experiment. I already had some Java code which I wrote ages ago, but I&amp;rsquo;ve never got round to converting it to Javascript 1. Elm seems like a nice alternative so I decided to give it a try.
Number of slits 1 2 3 4 5 6 The app shows the light source, slits and the screen with an intensity graph of the diffraction pattern.</description></item><item><title>Linux Setup with XMonad</title><link>https://broch.tech/posts/linux-install/</link><pubDate>Sat, 19 Nov 2016 00:00:00 +0000</pubDate><guid>https://broch.tech/posts/linux-install/</guid><description>Earlier this year, after many years of using OSX, I decided to switch to using Linux for my desktop. Most of the development tools I use work better on Linux &amp;ndash; I mostly work directly with plain-text format files and I use the terminal a lot. I also wanted to use a tiling window manager with a minimal user interface. The changes Apple have been making to their machines and OS over the past few years have been irrelevant to my needs at best, and in some cases are downright annoying.</description></item><item><title>OAuth2 and OpenID Connect in Haskell</title><link>https://broch.tech/posts/oauth2-openid-connect-haskell/</link><pubDate>Mon, 02 May 2016 00:00:00 +0000</pubDate><guid>https://broch.tech/posts/oauth2-openid-connect-haskell/</guid><description>I&amp;rsquo;ve been working for a while on an implementation of the OpenID Connect specification. Since it was something I already knew quite a bit about from my previous job, it seemed like a good idea for a &amp;ldquo;real-world&amp;rdquo; Haskell project. The result is a project called &amp;ldquo;Broch&amp;rdquo; 1, which is an OpenID Connect identity provider. Features include
Expand Down
Loading

0 comments on commit 7f0532f

Please sign in to comment.