Skip to content

Runtime tracing support: PHP #34

Open

Description

@noQbot

Goal

Runtime tracing for PHP services (Laravel/Symfony/etc.).

Likely approach

  • The OpenTelemetry PHP extension (a Zend extension enabled in php.ini) with
    auto-instrumentation — zero-edit, engine-level hooks.
  • Per-function enter/exit spans with request correlation and bounded summaries.

Shared contract (every language tracer)

Vinv's index, Code Graph, and grounded Q&A already work across languages — the gap
is runtime evidence. A new tracer only has to emit the same event contract the
Python tracer does, and everything downstream (the trace↔source join,
values_of/slice/rank_suspects, flamegraphs, verified-fix replay) works unchanged:

  • Emit the SpanEvent JSONL contract — contracts/src/lens_contracts/span_event.py
    and contracts/src/lens_contracts/schemas/span_event.schema.json (enter/exit,
    request_id, component, duration_ms, bounded arg/return summaries, errors).
  • Feed identification's trace↔source join, keyed on the qualified symbol name the
    index already extracts for this language.
  • Zero-edit is a hard ground rule (CONTRIBUTING.md): users must not modify
    their own code to be traced — use runtime/agent instrumentation, not manual spans.
  • Reference implementation: tracelens/ (Python — AST import-hook / sys.monitoring
    • OTel contrib auto-instrumentation).

Acceptance criteria

  • A sample service in this language runs under the tracer with no code changes
    and produces valid SpanEvent JSONL.
  • identification joins the spans to indexed symbols; rank_suspects / values_of
    / slice work against a run.
  • Any platform/privilege constraints are documented and degrade cleanly.

Activity

  1. added
    enhancement
    help wanted
    language-support
    on Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhelp wantedlanguage-support

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions