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
PHPでもTraceがしたい!! / Introduction of OpenCensus f...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
castaneai
June 27, 2019
Programming
2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PHPでもTraceがしたい!! / Introduction of OpenCensus for PHP
OpenCensus/OpenTelemetry meetup vol.2 での発表資料です
https://opencensus.connpass.com/event/132588/
castaneai
June 27, 2019
More Decks by castaneai
See All by castaneai
Cloud Gaming Platform with Go
castaneai
2
3k
自己紹介と、環境と、Scrapboxのすすめ / engineer_ekaki self-introduction
castaneai
1
2k
お絵かきとScrapbox / Painting and Scrapbox
castaneai
0
870
Other Decks in Programming
See All in Programming
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.4k
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
13
6.3k
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
840
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
280
Vite+ Unified Toolchain for the Web
naokihaba
0
360
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.4k
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
7k
エージェンティックRAGにAWSで入門しよう!
har1101
9
1.8k
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
960
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.5k
スマートグラスで並列バイブコーディング
hyshu
0
260
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
300
Featured
See All Featured
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
400
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
240
Rails Girls Zürich Keynote
gr2m
96
14k
30 Presentation Tips
portentint
PRO
1
330
Building Adaptive Systems
keathley
44
3.1k
Side Projects
sachag
455
43k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Transcript
PHPでも Traceがしたい! OpenTelemetry meetup vol.2
@castaneai GitHub castaneai Twitter castanea • OpenCensus for PHP Contributor
• ゲームのサーバーやさん • GCPの同人誌などを書いてます
突然ですが アンケート
PHPをメインで 使っている人?
None
None
PHPにもある! OpenCensus Instrumentation
census-instrumentation/opencensus-php
使い方
[1] Install opencensus package $ composer require opencensus/opencensus:~0.2
[2] Create Exporter $exporter = new StackdriverExporter();
[3] Start Tracing $exporter = new StackdriverExporter(); Tracer::start($exporter);
[4] Create Span $exporter = new StackdriverExporter(); Tracer::start($exporter); Tracer::inSpan(['name' =>
'test-span'], function () { sleep(1); echo 'hello'; });
[5] Done!!
OpenCensus for PHP のさらにすごい ところ
PHPインタプリタに 直接踏み込む Tracing
OpenCensus PHP Extension
[1] Install opencensus extension $ pecl install opencensus-alpha
[2] Enable the extension in php.ini extension=opencensus.so
[3] Watching for function invocation $exporter = new StackdriverExporter(); Tracer::start($exporter);
sleep(1); echo 'hello'; opencensus_trace_function('sleep');
[4] Done!!
ライブラリ内の関数でも built-in関数でも 直接手を加えずに Traceできる
よく使いそうなライブラリは Integration あり • curl (Guzzle) • gRPC • PDO
(Database driver) • Laravel • Wordpress • etc...
None
(Alpha) ... productionで使えないのでは…?
ライブラリのチューニングに役立った!
うおおお!! OpenCensus for PHP!! すごい!今すぐ試し たい!
でもPHPの 環境構築 面倒くさい… nginx?? fpm??
castaneai/php-opencensus-example docker-compose で すぐに試せるセット 作りました!!!
OpenCensus for PHP 最近の動向
OpenCensus Stats
OC Agent 対応も