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
Collecting logs from mobile apps
Search
rejasupotaro
April 15, 2016
Programming
350
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Collecting logs from mobile apps
rejasupotaro
April 15, 2016
More Decks by rejasupotaro
See All by rejasupotaro
A Practical Approach To Semantic Search
rejasupotaro
2
620
Challenges in Search in Global Services
rejasupotaro
1
3.9k
ML on Mobile DroidKaigi 2018
rejasupotaro
3
8.4k
Managing tasks to Kotlin
rejasupotaro
1
250
Go Global - #CookpadTechconf 2017
rejasupotaro
8
8.3k
Successful Locali(z)(s)ation - Droidcon Berlin 2016
rejasupotaro
5
1.5k
Inside Kotlin
rejasupotaro
0
170
Improving UX through performance Droidcon Italy
rejasupotaro
38
11k
Think about API orchestration with RxJava
rejasupotaro
9
2.7k
Other Decks in Programming
See All in Programming
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
300
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
150
CSC307 Lecture 17
javiergs
PRO
0
320
Inside Stream API
skrb
1
740
AI 輔助遺留系統現代化的經驗分享
jame2408
1
790
AIで効率化できた業務・日常
ochtum
0
140
The NotImplementedError Problem in Ruby
koic
1
850
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
590
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
140
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
210
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
360
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
200
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
210
Agile that works and the tools we love
rasmusluckow
331
21k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
270
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Building Adaptive Systems
keathley
44
3.1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
160
Un-Boring Meetings
codingconduct
0
320
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.8k
Transcript
Collecting logs from mobile apps Kentaro Takiguchi
About our service
None
None
non-RTL RTL flipped
Each user has a different context and background. Understanding users
is important.
Build - Measure - Learn
Build - Measure - Learn
None
What is “fluentd”? “ ” Fluentd is an open source
data collector, which lets us unify the data collection and consumption for a better use and understanding of data.
… …
… …
… … ? retryable retryable retryable
… … Filter / Buffer / Route
<match td.*.*> @id td_wild type tdlog buffer_type file max_retry_wait 1h
… </match> { tag: td.global.recipe_search_query_logs, timestamp: xxx, country: xxx, language: xxx, … } ```ruby Fluent::Logger::FluentLogger.new(tag_prefix, args).post(tag, map) ```
?
Offline ? Connectivity Correctness Performance
Data collector for mobile apps “Puree” https:/ /github.com/cookpad/puree-android https:/ /github.com/cookpad/puree-ios
Unified logging layer for mobile apps Puree has following features
Buffering Filtering Batching Retrying Pluggable
Search “chicken” public class RecipeSearchLog implements PureeLog { @SerializedName("event") String
event; @SerializedName("keyword") String keyword; @SerializedName("order") String order; @SerializedName("page") int page; @SerializedName("per_page") int perPage; @SerializedName("total_hits") int totalHits; } Puree.send(new RecipeSearchLog(…)); {“event”:”recipe.search”, “keyword”:”chicken”,…} Track events
Buffering & Batching log logs {“event”:”recipe.search”, “keyword”:”chicken”,…} {“event”:”recipe.search”, “keyword”:”chicken”,…} {“event”:”recipe.search”,
“keyword”:”chicken”,…} [ {“event”:”recipe.search”, “keyword”:”chicken”,…}, {“event”:”recipe.search”, “keyword”:”chicken”,…}, {“event”:”recipe.search”, “keyword”:”chicken”,…} ]
Retrying log logs …
Filtering drop SamplingFilter TimestampFilter add timestamp
Pluggable output plugins • custom filters • flush interval millis
• logs per request • max retry count
Find a bottleneck using Puree ? Image download is so
slow!
image size image format network type S3 fetch time image
convert time CDN cache hit ratio local cache hit ratio decode time render time number of threads device’s CPU / RAM OS version ?
{ "event": "image.download", "cache": "TCP_MISS", "cache_remote": "TCP_HIT", "content_length": "17670", "content_type":
"image/webp", "convert_time_ms": "64.445", "network_type": "4G", "s3_fetch_time_ms": "41.575", "total_time_ms": 1471, … } SELECT cache, network_type, ROUND(AVG(total_time_ms), 0) AS total_time_ms FROM image_download_logs WHERE TD_TIME_RANGE(…) GROUP BY cache, network_type SamplingFilter (1%) TimestampFilter
Collecting logs from mobile apps {“event”:”recipe.search”, “keyword”:”chicken”,…} {“event”:”recipe.search”, “keyword”:”chicken”,…} {“event”:”recipe.search”,
“keyword”:”chicken”,…} [ {“event”:”recipe.search”, “keyword”:”chicken”,…}, {“event”:”recipe.search”, “keyword”:”chicken”,…}, {“event”:”recipe.search”, “keyword”:”chicken”,…} ] add user_id, country, … {“tag”:”td.global.recipe_search”, “user_id”:”xxx”, …} SELECT * FROM table WHERE …