instana/instana-php-opentracing
Instana’s OpenTracing implementation for PHP. Send traces to an Instana Agent via the PHP sensor (default port 16816) or REST SDK endpoint (port 42699). Provides InstanaTracer helpers, tags, and span types for instrumenting PHP apps.
instana/instana-php-opentracing package remains aligned with distributed tracing for Laravel/PHP, but its OpenTracing focus (now deprecated in favor of OpenTelemetry) and Instana-specific dependencies limit long-term flexibility. The new release’s backward-compatibility changes (renaming methods for PHP <7 support) suggest the package is prioritizing legacy support over modernization.entryType(), localType(), exitType()) are non-breaking but signal a focus on legacy PHP versions, which may conflict with modern Laravel’s PHP 8.x requirements.Illuminate\Queue).open-telemetry/opentelemetry-php instead?*Type()) are backward-compatible but add unnecessary complexity for new projects.open-telemetry/opentelemetry-php) as a replacement.use Instana\Tracer\InstanaTracer;
use OpenTracing\GlobalTracer;
public function handle($request, Closure $next) {
$span = GlobalTracer::get()->buildSpan('http.request')->start();
try {
return $next($request);
} finally {
$span->finish();
}
}
InstanaSpanType::entry() → InstanaSpanType::entryType()).| Phase | Task | Dependencies |
|---|---|---|
| 1. Assessment | Evaluate OpenTelemetry as alternative. | None. |
| 2. Compatibility Test | Verify PHP 8.x/Laravel 9+ support in staging. | Isolated test environment. |
| 3. Setup | Install package, configure Instana tracer, update deprecated methods. | Instana account, PHP/Laravel env. |
| 4. HTTP | Instrument middleware for request tracing. | Basic Laravel setup. |
| 5. Queues | Add span creation in HandleJobsMiddleware or job classes. |
Queue workers running. |
| 6. DB | Wrap Eloquent queries in spans (custom repository layer). | Eloquent usage. |
| 7. Sampling | Configure sampling rules (e.g., rate-limiting). | Tracing data volume. |
| 8. Validation | Verify traces in Instana dashboard. | Instana agent running. |
TracerInterface) and plan for OpenTelemetry migration.How can I help you explore Laravel packages today?