Workshop 3
summary
Shows concrete instrumentation: installs the OpenTelemetry PHP extension via PECL, configures HTTP/JSON export to Jaeger, and then switches to Sentry using a Sentry DSN to send traces. Builds a Cake middleware that starts a transaction (root span), a custom query logger that turns parameterized SQL and timings into child spans, and HTTP-client event hooks that record external API 400ms calls. Observes single-span examples ~4ms and aggregated P95 ~21ms, uses the eximer sampling profiler at ~10ms sampling (profiles currently capped at 30s), and flushes telemetry in the server_terminate event so sending does not slow the client.
AI-written summary · about
chapters (51)
- 0:00Introduction and background
- 1:04What is observability
- 2:13OpenTelemetry introduction
- 3:17Setting up a CakePHP app
- 4:43Zero-code instrumentation
- 7:13Running Jaeger for traces
- 7:55Installing OpenTelemetry dependencies
- 9:01Viewing first trace in Jaeger
- 10:30How auto-instrumentation works
- 13:09Adding custom spans
- 18:42Switching to Sentry for demo
- 19:52Sentry PHP SDK overview
- 21:07Middleware-based tracing
- 24:05Configuring Sentry SDK
- 28:19Transactions vs spans
- 31:13Enabling tracing in Sentry
- 34:03Setting precise transaction start
- 36:26Improving transaction naming
- 37:32Distributed tracing concept
- 39:26Updating transaction name dynamically
- 40:30Measuring bootstrap time
- 43:09Database query tracing
- 44:54Break time announcement
- 45:15Sentry self-hosting options
- 46:19Precise timing with start/end stamps
- 48:09Tracing HTTP client calls
- 51:32Creating custom query logger
- 57:28Query logger implementation
- 1:01:41Viewing database spans in Sentry
- 1:02:57Aggregating query performance
- 1:06:19Tracing third-party API calls
- 1:17:34Enhancing HTTP client spans
- 1:21:50Event-based tracing in CakePHP
- 1:22:12Error reporting with Sentry
- 1:23:36Custom error logger setup
- 1:28:46User context in error reporting
- 1:31:20Profiling introduction
- 1:32:25Deterministic vs sampling profilers
- 1:35:21Setting up Eximer profiler
- 1:36:25Viewing profiling data
- 1:40:46Real-world profiling example
- 1:43:37Flame graph aggregation
- 1:46:49Sending profiling data to Sentry
- 1:47:53Using Relay for performance
- 1:49:01Server terminate event in CakePHP
- 1:52:32Metrics introduction
- 1:53:36Recording custom metrics
- 1:56:16Flushing metrics in terminate
- 1:57:35Viewing metrics in Sentry
- 1:59:07Alerting and anomaly detection
- 2:01:00Q&A session
related talks
37mBeyond Getting Started: Using OpenTelemetry to Its Full Potential
27mDistributed Tracing with OpenTelemetry
41mPractical introduction to OpenTelemetry tracing
01h 08mWorkshop: Analyzing and Visualizing OpenTelemetry Traces with SQL
40mPractical introduction to OpenTelemetry tracing
38mPractical introduction to OpenTelemetry tracing
30mPractical introduction to OpenTelemetry Tracing
43mOpenTelemetry with PHP is easier than you think!
