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
650
Challenges in Search in Global Services
rejasupotaro
1
4k
ML on Mobile DroidKaigi 2018
rejasupotaro
3
8.4k
Managing tasks to Kotlin
rejasupotaro
1
260
Go Global - #CookpadTechconf 2017
rejasupotaro
8
8.3k
Successful Locali(z)(s)ation - Droidcon Berlin 2016
rejasupotaro
5
1.5k
Inside Kotlin
rejasupotaro
0
180
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
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
210
作るコストが小さくなった時代 幸せに働くために改めて考えたいこと 〜エンジニアとして価値を出し続けるために注視している二分野〜
yuppeeng
0
190
AI時代に設計が 最大の生産性レバーになる 意図駆動開発とデータを消さない設計|Don't Delete Your Data or Your Intent — Design as the Deepest Lever in the AI Era
tomohisa
1
730
React本体のコードリーディング
high_g_engineer
1
140
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
160
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
450
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
160
メールのエイリアス機能を履き違えない
isshinfunada
0
230
AIが無かった頃の素敵な出会いの話
codmoninc
1
390
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
160
【QA Test Talk Vol.8】AI-DLC による Whole Team Approach の加速
pkshadeck
PRO
0
120
その節約、円になってますか?
isamumumu
1
700
Featured
See All Featured
Building Adaptive Systems
keathley
44
3.2k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
1.1k
A Tale of Four Properties
chriscoyier
163
24k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
360
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
370
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
Making the Leap to Tech Lead
cromwellryan
135
10k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.3k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
430
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
170
Making Projects Easy
brettharned
120
6.7k
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 …