Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Scala: Context & Observability
Search
Michał Bednarz
May 25, 2023
Programming
0
76
Scala: Context & Observability
Slides for The Art of Scala presentation in Warsaw on 25th May 2023
Michał Bednarz
May 25, 2023
Tweet
Share
More Decks by Michał Bednarz
See All by Michał Bednarz
Scala: The Ideal Language for Game Wallets
bednam
0
15
Concurrency in Scala: from locks to STM
bednam
0
150
Other Decks in Programming
See All in Programming
Implementation Patterns
denyspoltorak
0
280
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
620
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
590
Patterns of Patterns
denyspoltorak
0
1.4k
AIエージェントの設計で注意するべきポイント6選
har1101
7
3.4k
2026年 エンジニアリング自己学習法
yumechi
0
130
Package Management Learnings from Homebrew
mikemcquaid
0
200
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
190
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
180
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
150
Featured
See All Featured
Designing Experiences People Love
moore
144
24k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
120
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
910
Site-Speed That Sticks
csswizardry
13
1.1k
The Invisible Side of Design
smashingmag
302
51k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
79
We Are The Robots
honzajavorek
0
160
How to train your dragon (web standard)
notwaldorf
97
6.5k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
430
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
130
Transcript
Scala: Context & Observability
Context propagation explicit parameter implicit parameter
Thread-safe state on JVM AtomicRef ThreadLocal Every thread has its
own local copy of the state which is not visible to the others Shared state safely updated by many threads using optimistic concurrency (CAS)
Context propagation on JVM ThreadLocal InheritableThreadLocal DynamicVariable
None
None
None
None
None
Scope Lexical Dynamic Depends on location in source code Depends
on method call graph
None
None
None
Functional context propagation ReaderT / Kleisli (cats) IOLocal (cats-effect) Context
functions (scala 3)
Context propagation with cats-mtl Ask Local Stateful read-only environment effect
dynamic scope effect shared mutable state effect
None
None
None
None
None
None
None
Local + log4cats demo
None
Local + log4cats + IOLocal demo
None
None
Scala 3 Context Functions
None
linktr.ee/mbednarz