<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Muutassim Mukhtar</title>
    <description>The latest articles on DEV Community by Muutassim Mukhtar (@triplemcoder).</description>
    <link>https://dev.to/triplemcoder</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F379747%2F750345b9-2abc-4a82-b5ca-7dafc782e95a.jpeg</url>
      <title>DEV Community: Muutassim Mukhtar</title>
      <link>https://dev.to/triplemcoder</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/triplemcoder"/>
    <language>en</language>
    <item>
      <title>[Boost]</title>
      <dc:creator>Muutassim Mukhtar</dc:creator>
      <pubDate>Mon, 18 Aug 2025 00:44:22 +0000</pubDate>
      <link>https://dev.to/triplemcoder/-26d6</link>
      <guid>https://dev.to/triplemcoder/-26d6</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/triplemcoder/lifting-the-hood-on-trace-propagation-in-opentelemetry-4dj3" class="crayons-story__hidden-navigation-link"&gt;Lifting the Hood on Trace Propagation in OpenTelemetry&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/triplemcoder" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F379747%2F750345b9-2abc-4a82-b5ca-7dafc782e95a.jpeg" alt="triplemcoder profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/triplemcoder" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Muutassim Mukhtar
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Muutassim Mukhtar
                
              
              &lt;div id="story-author-preview-content-2779561" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/triplemcoder" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F379747%2F750345b9-2abc-4a82-b5ca-7dafc782e95a.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Muutassim Mukhtar&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/triplemcoder/lifting-the-hood-on-trace-propagation-in-opentelemetry-4dj3" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Aug 18 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/triplemcoder/lifting-the-hood-on-trace-propagation-in-opentelemetry-4dj3" id="article-link-2779561"&gt;
          Lifting the Hood on Trace Propagation in OpenTelemetry
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/opentelemetry"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;opentelemetry&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/distributedtraces"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;distributedtraces&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/go"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;go&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/systemdesign"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;systemdesign&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/triplemcoder/lifting-the-hood-on-trace-propagation-in-opentelemetry-4dj3" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;2&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/triplemcoder/lifting-the-hood-on-trace-propagation-in-opentelemetry-4dj3#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            6 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>opentelemetry</category>
      <category>distributedtraces</category>
      <category>go</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>Lifting the Hood on Trace Propagation in OpenTelemetry</title>
      <dc:creator>Muutassim Mukhtar</dc:creator>
      <pubDate>Mon, 18 Aug 2025 00:40:17 +0000</pubDate>
      <link>https://dev.to/triplemcoder/lifting-the-hood-on-trace-propagation-in-opentelemetry-4dj3</link>
      <guid>https://dev.to/triplemcoder/lifting-the-hood-on-trace-propagation-in-opentelemetry-4dj3</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F26rcwjtcw1m77srivpcv.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F26rcwjtcw1m77srivpcv.webp" alt=" " width="720" height="900"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OpenTelemetry is really changing the game for observability, especially by offering the first widely adopted, vendor neutral telemetry libraries. Tracing was the first signal the project tackled, and its now generally available in most major programming languages.&lt;/p&gt;

&lt;p&gt;Personally, Im a big fan of tracing. I think its a much cleaner and more effective way to pass data to your observability provider. they can take that data and turn it into something truly useful, whether thats a Gantt style view of spans or metrics that drive alerts.&lt;/p&gt;

&lt;p&gt;One of the most powerful features is distributed tracing. the ability to connect spans across different services into a single trace. When one service makes an RPC call to another, the trace context can follow along, giving you a complete, end-to-end view of requests across your entire platform.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff2u99r2kev69w80cn7w7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff2u99r2kev69w80cn7w7.png" alt=" " width="800" height="567"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the screenshot above for example,the trace has spans from 3 different services: &lt;strong&gt;frontend&lt;/strong&gt;, &lt;strong&gt;productservice&lt;/strong&gt;, and &lt;strong&gt;statsservice&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is trace propagation?
&lt;/h2&gt;

&lt;p&gt;To connect traces across different services, you need to pass some context along with each request. This process is known as trace propagation, and its what we will be diving into in this article.&lt;/p&gt;

&lt;h2&gt;
  
  
  W3C Trace Context?
&lt;/h2&gt;

&lt;p&gt;Unless you are working with a legacy system that already uses a different tracing format, you should stick with the &lt;a href="https://www.w3.org/TR/trace-context/" rel="noopener noreferrer"&gt;W3C Trace Context Recommendation&lt;/a&gt;. Its the recommended standard for propagating trace context over HTTP. While its designed with HTTP in mind, many of its concepts can also be applied to other communication channels, like Kafka messages, for example.&lt;/p&gt;

&lt;p&gt;Trace Context specifies two HTTP headers that will be used to pass context around, traceparent and tracestate&lt;/p&gt;

&lt;h2&gt;
  
  
  traceparent
&lt;/h2&gt;

&lt;p&gt;The traceparent HTTP header includes the root of context propagation. It consists in a comma-separated suite of fields that include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The version of Trace Context being used. Only one version, 00 exists in 2023&lt;br&gt;
Then, for version 00:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The current Trace ID, as a 16-byte array representing the ID of the entire trace.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The current Span ID (called parent-id in the spec), an 8-byte array representing the ID of the parent request.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Flags, an 8-byte hex-encoded field which controls tracing flags such as sampling.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  tracestate
&lt;/h2&gt;

&lt;p&gt;The tracestate HTTP header is meant to include proprietary data used to pass specific information across traces.&lt;/p&gt;

&lt;p&gt;Its value is a comma-separated list of key/values, where each pair is separated by an equal sign. Obviously, the trace state shouldn’t include any sensitive data.&lt;/p&gt;

&lt;p&gt;For example, with requests coming from public API endpoints which can be called either by internal services, or by external customers, both could be passing a traceparent header. However, external ones would generate orphan spans, as the parent one is stored within the customers service, not ours.&lt;/p&gt;

&lt;p&gt;So we add a tracestate value indicating the request comes from an internal service, and we only propagate context if that value is present&lt;/p&gt;

&lt;h2&gt;
  
  
  A context is passed
&lt;/h2&gt;

&lt;p&gt;With both these fields being passed, any tracing library should have enough information to provide distributed tracing.&lt;/p&gt;

&lt;p&gt;A request could pass the following headers:&lt;br&gt;
&lt;code&gt;traceparent: 00-d4cda95b652f4a1592b449d5929fda1b-6e0c63257de34c92-01&lt;br&gt;
tracestate: myservice=true&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The traceparent header indicates a trace ID &lt;code&gt;(d4cda95b652f4a1592b449d5929fda1b)&lt;/code&gt;, a span ID &lt;code&gt;(6e0c63257de34c92)&lt;/code&gt;, and sets a flag indicating the parent span was sampled (so its likely we want to sample this one too).&lt;/p&gt;

&lt;p&gt;The tracestate header provides a specific key/value that we can use to make appropriate decisions, such as whether we want to keep the context or not.&lt;/p&gt;

&lt;h2&gt;
  
  
  How OpenTelemetry implements propagation
&lt;/h2&gt;

&lt;p&gt;The OpenTelemetry &lt;a href="https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/api-propagators.md" rel="noopener noreferrer"&gt;specification &lt;/a&gt;defines a Propagators interface to allow any implementation to establish its own propagation convention, such as W3C TraceContext.&lt;/p&gt;

&lt;p&gt;A propagator must implement two methods:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Inject&lt;/strong&gt; – to insert the current span context into a carrier object (such as an HTTP headers map).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Extract&lt;/strong&gt;– to retrieve the span context from a carrier object.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For example, the following shows how this is &lt;a href="https://github.com/open-telemetry/opentelemetry-go/blob/9d633d2ed510726d8919b4f36aba56f412b0f991/propagation/propagation.go#L91-L111" rel="noopener noreferrer"&gt;implemented in Go:&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4zlogw05ta0x0wdwkimy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4zlogw05ta0x0wdwkimy.png" alt=" " width="800" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each instrumentation library making or receiving external calls then has the responsibility to call inject/extract to write/read the span context and have it passed around.&lt;/p&gt;

&lt;h2&gt;
  
  
  Extract and Inject examples
&lt;/h2&gt;

&lt;p&gt;For example, the following is &lt;a href="https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/6e89c92f189bc6e187da06ea2af4e38531b93601/instrumentation/rack/lib/opentelemetry/instrumentation/rack/middlewares/tracer_middleware.rb#L69-L72" rel="noopener noreferrer"&gt;Rack extracting&lt;/a&gt; the context from the propagator to generate a new span in Ruby:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6jlihhhrdgna247dj9kt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6jlihhhrdgna247dj9kt.png" alt=" " width="800" height="105"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the following is&lt;a href="https://github.com/open-telemetry/opentelemetry-js/blob/eecb8009a3092d92381a9f843c5720e2a2b61486/experimental/packages/opentelemetry-instrumentation-http/src/http.ts#L656" rel="noopener noreferrer"&gt; NodeJS adding the context&lt;/a&gt; into HTTP headers when making a request with the http package:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffv3wfzzwgj2tevozymqp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffv3wfzzwgj2tevozymqp.png" alt=" " width="800" height="29"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The full propagation flow
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcca2z6txp0nxvzvpf7qz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcca2z6txp0nxvzvpf7qz.png" alt=" " width="800" height="290"&gt;&lt;/a&gt;&lt;br&gt;
To put in other words, the diagram above shows what each service is expected to perform to enable propagation. The library emitting an HTTP call is expected to call inject, which will add the proper HTTP headers to the request. The library receiving HTTP requests is expected to call extract to retrieve the proper span context from the request’s HTTP headers.&lt;/p&gt;

&lt;p&gt;Note that each language implementation of OpenTelemetry provides multiple contrib packages that allow easy instrumentation of common frameworks and libraries. Those packages will handle propagation for you. Unless you write your own framework or HTTP library, you should not need to call inject or extract yourself. All you need to do is configure the global propagation mechanism (see below).&lt;/p&gt;

&lt;h2&gt;
  
  
  Non-HTTP propagation
&lt;/h2&gt;

&lt;p&gt;Not all services communicate through HTTP. For example, you could have one service emitting a Kafka message, and another one reading it.&lt;/p&gt;

&lt;p&gt;The OpenTelemetry propagation API is purposefully generic, as all it does is read a hash and return a span context, or read a span context and inject data into a hash. So you could replace a hash of HTTP headers with anything you want.&lt;/p&gt;

&lt;p&gt;The Python Kafka &lt;a href="https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/utils.py#L160-L164" rel="noopener noreferrer"&gt;instrumentation calls inject on the message’s&lt;/a&gt; headers when producing a message:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqscgcbwc8h4ggukohoju.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqscgcbwc8h4ggukohoju.png" alt=" " width="800" height="105"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And calls &lt;a href="https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/utils.py#L215-L217" rel="noopener noreferrer"&gt;extract on those same headers&lt;/a&gt; when reading a message:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz2hec3wwejntkufexmmp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz2hec3wwejntkufexmmp.png" alt=" " width="800" height="68"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any language or library that uses the same convention can benefit from distributed tracing within kafka messages, or any other communication mechanism.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting a propagator
&lt;/h2&gt;

&lt;p&gt;Great! We now know how propagation for traces works within Otel. But how do we set it up?&lt;br&gt;
Each OpenTelemetry library is expected to &lt;a href="https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/api-propagators.md#global-propagators" rel="noopener noreferrer"&gt;provide methods for setting&lt;/a&gt; and &lt;a href="https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/api-propagators.md#global-propagators" rel="noopener noreferrer"&gt;retrieving a global propagator&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For example, the Rust implementation provides global&lt;a href="https://github.com/open-telemetry/opentelemetry-rust/blob/c3b1056e0e947f1d0e44109dd401cdf3132bacd4/opentelemetry-api/src/global/propagation.rs#L15" rel="noopener noreferrer"&gt;::set_text_map_propagator&lt;/a&gt; and global&lt;a href="https://github.com/open-telemetry/opentelemetry-rust/blob/c3b1056e0e947f1d0e44109dd401cdf3132bacd4/opentelemetry-api/src/global/propagation.rs#L22" rel="noopener noreferrer"&gt;::get_text_map_propagator&lt;/a&gt; that will allow configuring and retrieving the global propagator.&lt;/p&gt;

&lt;p&gt;As you may have seen in the above specification link, the default propagator will be a no-op:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The OpenTelemetry API MUST use no-op propagators unless explicitly configured otherwise&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You should therefore always ensure your propagator of choice is properly set globally, and each library that needs to call inject or extract will then be able to retrieve it.&lt;/p&gt;

&lt;p&gt;Each OpenTelemetry implementation will &lt;a href="https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/api-propagators.md#propagators-distribution" rel="noopener noreferrer"&gt;implement several propagators&lt;/a&gt; natively, including TraceContext, which you can use directly within your service. For example, the java one can be found as &lt;a href="//io.opentelemetry.api.trace.propagation.W3CTraceContextPropagator"&gt;io.opentelemetry.api.trace.propagation.W3CTraceContextPropagator&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Moving On
&lt;/h2&gt;

&lt;p&gt;Thanks for following along with this deep dive into context propagation in Otel. Hopefully, you now have a clearer understanding of how distributed tracing works within the library. You should be equipped to implement context propagation in any library instrumentation that makes or receives calls from external services.&lt;/p&gt;

&lt;p&gt;With distributed tracing properly set up across your platform, you will be able to see the full journey of every request, making it much easier to identify bottlenecks, trace issues, and debug problems effectively&lt;/p&gt;

</description>
      <category>opentelemetry</category>
      <category>distributedtraces</category>
      <category>go</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>How to Configure a Network Block Device on a Debian-Based System</title>
      <dc:creator>Muutassim Mukhtar</dc:creator>
      <pubDate>Thu, 17 Oct 2024 13:52:54 +0000</pubDate>
      <link>https://dev.to/triplemcoder/how-to-configure-a-network-block-device-on-a-debian-based-system-3moo</link>
      <guid>https://dev.to/triplemcoder/how-to-configure-a-network-block-device-on-a-debian-based-system-3moo</guid>
      <description>&lt;p&gt;&lt;em&gt;In this article, we will configure a Network Block Device on a Debian system. The communication will occur via a loopback device, with both the client and server running on the same system.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As you may know, Network Block Devices (NBD) allow us to access remote storage devices that are not physically present on the local machine. With NBD, we can access and utilize these remote storage devices on the local machine in the following three ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;SWAP&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;File System&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;RAW &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's get right into it. For the NBD export, export, an empty file will be used.The &lt;code&gt;/opt&lt;/code&gt; directory is to be used for the exported device and configuration files.  But Production environments may prefer different locations.&lt;/p&gt;

&lt;p&gt;-Install the NBD client and server packages.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ mkdir  ~/src&lt;/code&gt;&lt;br&gt;
&lt;code&gt;$ cd  ~/src&lt;/code&gt;&lt;br&gt;
&lt;code&gt;$ git clone https://github.com/NetworkBlockDevice/nbd.git&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The packages docbook-utils and autoconf-archive may not be installed on your system, install them now.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ sudo apt install nbd-client nbd-server&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create an nbd-server.conf file in the &lt;code&gt;/opt&lt;/code&gt; directory.  A minimal, no-comments file is sufficient.  (A more interesting configuration file can be found in the SOLUTIONS directory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;$ sudo vi /opt/nbd-server.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;/opt/nbd-server.conf&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe6mn3soni8uscocqmfiv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe6mn3soni8uscocqmfiv.png" alt="config" width="433" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Create two files for exporting and set the ownership to your user&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;$ sudo dd if=/dev/zero of=/opt/dsk1 status=progress bs=100M count=5&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ sudo dd if=/dev/zero of=/opt/dsk2 status=progress bs=100M count=5&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ sudo chmod 777 /opt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ sudo chown muutassim.muutassim /opt/*&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verify the nbd respond to a query &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;$ sudo nbd-server -C /opt/nbd-server.conf&lt;/code&gt;&lt;br&gt;
&lt;code&gt;$ sudo nbd-client -l 127.0.0.1 -p 10042&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9tai74i968m1io6umcjs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9tai74i968m1io6umcjs.png" alt="verify" width="618" height="92"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install the nbd kernel module, and verify the block devices are present&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;$ sudo modprobe -i nbd&lt;/code&gt;&lt;br&gt;
&lt;code&gt;$ ls /dev/nbd*&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1z0kpdild0cpd35rr6ko.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1z0kpdild0cpd35rr6ko.png" alt="nbd verify" width="800" height="29"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Connect the server supplied image, using the ip address, port to the local block device&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;sudo nbd-client -N export_block_device  127.0.0.1 10042 /dev/nbd0&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wipe out the NBD&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;$ sudo dd if=/dev/zero of=/dev/nbd0 bs=1M count=5&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fttj0lc3fnxionentxget.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fttj0lc3fnxionentxget.png" alt="wipeoutnbd" width="800" height="93"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create GPT label oon the NBD:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;sudo sh -c "echo 'label: gpt' | sfdisk /dev/nbd0"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fomqfvpz0rt3kd559kqsl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fomqfvpz0rt3kd559kqsl.png" alt="gpt" width="740" height="333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add a partition to the NBD:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;$ sudo sh -c "echo';'| sfdisk /dev/nbd0"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F93djq7ksblylleazh7av.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F93djq7ksblylleazh7av.png" alt="checking situation" width="712" height="344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add an ext3 filesystem to the network block device and test:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;$ sudo mkfs.ext3 -L nbd-foo /dev/nbd0&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk2vrdtjpandsbds7y5gd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk2vrdtjpandsbds7y5gd.png" alt="checking" width="599" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ sudo mount LABEL=nbd-foo /mnt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ sudo touch /mnt/file1&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ ls -l /mnt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7fuc12y4hdaa60lcbsf7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7fuc12y4hdaa60lcbsf7.png" alt="mount" width="603" height="158"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>storage</category>
      <category>kernel</category>
      <category>nbd</category>
    </item>
  </channel>
</rss>
