Skip to content

README telemetry examples reference stale classes and message names #40

Description

@nficano

README.md:182 imports Arcp\Messages\Telemetry\LogRecord and Arcp\Messages\Telemetry\Metric, but the implementation registers LogEvent and MetricEvent in src/Envelope/MessageCatalog.php:163. The README then checks instanceof LogRecord and instanceof Metric, so the example cannot run. The same section lists event type names such as tool_call, tool_result, artifact_ref, and result_chunk, while the actual catalog uses dot-separated names such as tool.invoke, tool.result, artifact.ref, and job.result_chunk. samples/submit-and-stream/main.php:12 also prints stale log.event and metric.event names, and its metric payload omits the required unit.

These stale snippets are in the front-door documentation and teach users class names and wire names that do not exist in the current PHP SDK. They also obscure the actual telemetry API exposed by JobContext::emitLog() and JobContext::emitMetric().

Fix prompt: Update the README and affected sample to use LogEvent, MetricEvent, and the current catalog type names. Replace the stale event-name list with names produced by MessageType::typeName(), make the metric example include a non-empty unit, and add a lightweight documentation or sample smoke test that catches nonexistent PHP classes in README snippets.

Activity

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

    documentationImprovements or additions to documentationseverity:mediumMedium severity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions