<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/discord-engineers-add-distributed-tracing-to-elixir-s-actor-model-without-performance-penalty-lb8hcyxrr" -->

---
title: Discord Engineers Add Distributed Tracing to Elixir&#x27;s...
description: Discord engineering built a custom Transport library to add distributed tracing to Elixir&#x27;s actor model, solving the challenge that OpenTelemetry context...
canonical: https://daily.dev/posts/discord-engineers-add-distributed-tracing-to-elixir-s-actor-model-without-performance-penalty-lb8hcyxrr
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Discord Engineers Add Distributed Tracing to Elixir&#x27;s Actor Model Without Performance Penalty | daily.dev
og:description: Discord engineering built a custom Transport library to add distributed tracing to Elixir&#x27;s actor model, solving the challenge that OpenTelemetry context...
og:url: https://daily.dev/posts/discord-engineers-add-distributed-tracing-to-elixir-s-actor-model-without-performance-penalty-lb8hcyxrr
og:image: https://api.daily.dev/og/posts/lB8HcYXrr.png
og:image:alt: Discord Engineers Add Distributed Tracing to Elixir&#x27;s Actor Model Without Performance Penalty
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Discord Engineers Add Distributed Tracing to Elixir's Actor Model Without Performance Penalty

**[InfoQ](https://daily.dev/sources/infoq)** · 4 min read · 1 upvotes · 0 comments

## Summary

Discord engineering built a custom Transport library to add distributed tracing to Elixir's actor model, solving the challenge that OpenTelemetry context propagation doesn't work natively between Elixir processes. The solution wraps messages in an Envelope struct carrying trace context, with drop-in replacements for GenServer call/cast. To handle million-user fanouts without overwhelming observability infrastructure, they implemented dynamic sampling that reduces span capture rates as fanout size grows. Performance optimizations included skipping context serialization for unsampled traces, restricting session services from starting new traces during fanout, and a fast-path filter that reads sampling flags from gRPC trace context without full deserialization — recovering over 10 CPU percentage points. The system proved its value during a production incident by revealing 16-minute guild connection delays that logs and metrics alone couldn't diagnose.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.infoq.com/news/2026/03/discord-elixir-actor-tracing/>

## Similar posts on daily.dev

- [Making Rust observability reliable at scale with OpenTelemetry](https://daily.dev/posts/making-rust-observability-reliable-at-scale-with-opentelemetry-aiqpoupou) · Datadog · 2 upvotes · 0 comments
- [Distributed tracing for agentic workflows with OpenTelemetry](https://daily.dev/posts/distributed-tracing-for-agentic-workflows-with-opentelemetry-3suufjdue) · Red Hat Developer · 0 upvotes · 0 comments
- [Injecting tracing the hot way](https://daily.dev/posts/injecting-tracing-the-hot-way-m3b5c77va) · Beam Bloggers Webring · 5 upvotes · 0 comments

---

Tags: [#devops](https://daily.dev/tags/devops), [#observability](https://daily.dev/tags/observability), [#elixir](https://daily.dev/tags/elixir), [#opentelemetry](https://daily.dev/tags/opentelemetry)

[View this post on daily.dev](https://daily.dev/posts/discord-engineers-add-distributed-tracing-to-elixir-s-actor-model-without-performance-penalty-lb8hcyxrr)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Discord Engineers Add Distributed Tracing to Elixir's Actor Model Without Performance Penalty","url":"https://daily.dev/posts/discord-engineers-add-distributed-tracing-to-elixir-s-actor-model-without-performance-penalty-lb8hcyxrr","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/discord-engineers-add-distributed-tracing-to-elixir-s-actor-model-without-performance-penalty-lb8hcyxrr"},"datePublished":"2026-03-28T10:25:44.606Z","dateModified":"2026-03-28T10:26:07.162Z","description":"Discord engineering built a custom Transport library to add distributed tracing to Elixir's actor model, solving the challenge that OpenTelemetry context...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/14fbf652ad585d8b4f7428e4a74f4889?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/14fbf652ad585d8b4f7428e4a74f4889?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"InfoQ","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"InfoQ","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/afc3bced3e1e4b188dd9127017a60e0c","url":"https://daily.dev/sources/infoq"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/discord-engineers-add-distributed-tracing-to-elixir-s-actor-model-without-performance-penalty-lb8hcyxrr","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"devops,observability,elixir,opentelemetry","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"InfoQ","item":"https://daily.dev/sources/infoq"},{"@type":"ListItem","position":3,"name":"Discord Engineers Add Distributed Tracing to Elixir's Actor Model Without Performance Penalty"}]}
```

