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
Monitoring PHP applications
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Mariusz Gil
May 05, 2014
Programming
300
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Monitoring PHP applications
Talk from local meetup.
Mariusz Gil
May 05, 2014
More Decks by Mariusz Gil
See All by Mariusz Gil
Aspect Oriented Programming
mariuszgil
1
340
Designing and implementing GraphQL API
mariuszgil
1
110
Discovering unknown with EventStorming ConFoo
mariuszgil
0
320
Game of Developer Life... Deconstructed
mariuszgil
1
200
Back to forgotten roots
mariuszgil
1
430
Go micro with microservices
mariuszgil
5
710
Machine Learning for the rescue
mariuszgil
0
450
Discovering graph structures
mariuszgil
3
560
Introduction to Aerospike with PHP
mariuszgil
8
870
Other Decks in Programming
See All in Programming
net-httpのHTTP/2対応について
naruse
0
470
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
120
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
200
Agentic UI
manfredsteyer
PRO
0
130
OSもどきOS
arkw
0
480
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
1.3k
AIで効率化できた業務・日常
ochtum
0
120
エージェンティックRAGにAWSで入門しよう!
har1101
8
1.4k
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
12k
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
480
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
150
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
490
Featured
See All Featured
How to Ace a Technical Interview
jacobian
281
24k
GraphQLとの向き合い方2022年版
quramy
50
15k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
160
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
480
Scaling GitHub
holman
464
140k
ラッコキーワード サービス紹介資料
rakko
1
3.6M
Discover your Explorer Soul
emna__ayadi
2
1.1k
Deep Space Network (abreviated)
tonyrice
0
170
Designing for Performance
lara
611
70k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
Building an army of robots
kneath
306
46k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Transcript
MONITORING PHP APPS with metrics Mariusz Gil
None
architecture
backend mods
devops
sexy frontend
business logic
technology
the client
None
life guard
monitoring and the answer is…
fast deployment low price strength and power
None
None
graphite even better monitoring
carbon whisper web app
carbon whisper web app metrics data charts
carbon app metrics servers metrics
carbon backtop bucky collectd diamond evenflow ganglia graphios grockets hoardid
host sflow jmxtrans logster sensu statsd statsite
web app
php lang? what about
None
$log = new \StatsD\Client(! ! [$host=‚localhost']! ! [, $port=8125]! );
$log->start($stat);! $log->stop($stat [, $sampleRate]);
$log->timing($stat, $time [, $sampleRate]);!
$log->increment($stat [, $sampleRate]);! $log->decrement($stat [, $sampleRate]);
$log->gauge($stat, $val, [, $sampleRate]);!
None
None
<?php ! $cache =
apc_cache_info(); $cache_user = apc_cache_info('user', 1); $mem = apc_sma_info(); ! $stats = array( "mem"=>array( "segments" => (int)$mem['num_seg'], "segment_size" => (int)$mem['seg_size'], "total" => (int)$mem['num_seg'] * $mem['seg_size'], ), "opcode"=>array( "files_count" => (int)$cache['num_entries'], "files_size" => (int)$cache['mem_size'], "hits" => (int)$cache['num_hits'], "misses" => (int)$cache['num_misses'], "full_count" => (int)$cache['expunges'], ), "user"=>array( "vars_count" => (int)$cache_user['num_entries'], "vars_size" => (int)$cache_user['mem_size'], "hits" => (int)$cache_user['num_hits'], "misses" => (int)$cache_user['num_misses'], "full_count" => (int)$cache_user['expunges'], ), ); ! echo json_encode($stats);
app logs? metrics from
None
app server app server mobile apps
mobile apps app server app server fluentd php php
<?php! ! // you can choose your own AutoLoader! require_once
__DIR__.'/src/Fluent/Autoloader.php';! ! use Fluent\Logger\FluentLogger;! ! Fluent\Autoloader::register();! ! $logger = new FluentLogger("localhost","24224");! $logger->post("debug.test",array("hello"=>"world"));!
app server app server fluentd php php graphite logster mobile
apps
None
THANKS! @mariuszgil