Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Scala: Context & Observability
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Michał Bednarz
May 25, 2023
Programming
86
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Scala: Context & Observability
Slides for The Art of Scala presentation in Warsaw on 25th May 2023
Michał Bednarz
May 25, 2023
More Decks by Michał Bednarz
See All by Michał Bednarz
Scala: The Ideal Language for Game Wallets
bednam
0
33
Concurrency in Scala: from locks to STM
bednam
0
180
Other Decks in Programming
See All in Programming
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
1
430
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
170
R8 の設定見直しでアプリサイズ削減
andpad
0
220
golang-bob.pdf
iwatsukayura
0
130
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
500
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
270
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
ジョジョの世界をXRで再現する
mofurune
0
160
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
180
AmebaブログはKMPから卒業します
kmars0605
0
190
Featured
See All Featured
HDC tutorial
michielstock
2
960
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
950
It's Worth the Effort
3n
188
29k
The Limits of Empathy - UXLibs8
cassininazir
2
720
Site-Speed That Sticks
csswizardry
13
1.6k
Building Adaptive Systems
keathley
44
3.2k
Believing is Seeing
oripsolob
1
240
The Invisible Side of Design
smashingmag
301
52k
Building the Perfect Custom Keyboard
takai
2
910
Side Projects
sachag
456
43k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
320
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
550
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