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
77
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
16
Concurrency in Scala: from locks to STM
bednam
0
160
Other Decks in Programming
See All in Programming
15年目のiOSアプリを1から作り直す技術
teakun
1
600
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
150
Head of Engineeringが現場で回した生産性向上施策 2025→2026
gessy0129
0
210
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.4k
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
280
Python’s True Superpower
hynek
0
200
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
4
380
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
1.6k
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
4
370
CSC307 Lecture 14
javiergs
PRO
0
450
日本だけで解禁されているアプリ起動の方法
ryunakayama
0
370
Rubyと楽しいをつくる / Creating joy with Ruby
chobishiba
0
200
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Google's AI Overviews - The New Search
badams
0
930
Design in an AI World
tapps
0
160
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
110
New Earth Scene 8
popppiees
1
1.7k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
370
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
140
Balancing Empowerment & Direction
lara
5
930
Embracing the Ebb and Flow
colly
88
5k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
360
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