# therefore not useful here
        pass
    def _on_run_create(self, run: Run) -> None:
        """Start a run."""
        if run.parent_run_id is None:
            self.send_stream.send_nowait(
                RunLogPatch(
                    {
                        "op": "replace",
                        "path": "",
                        "value": RunState(
                            id=str(run.id),
                            streamed_output=[],
                            final_output=None,
                            logs=[],
                        ),
                    }
                )
            )
        if not self.include_run(run):
            return
        # Determine previous index, increment by 1
        with self.lock:
            self._index_map[run.id] = max(self._index_map.values(), default=-1) + 1
        # Add the run to the stream
        self.send_stream.send_nowait(
            RunLogPatch(
                {
                    "op": "add",
                    "path": f"/logs/{self._index_map[run.id]}",
                    "value": LogEntry(
                        id=str(run.id),
                        name=run.name,
                        type=run.run_type,
                        tags=run.tags or [],
                        metadata=run.extra.get("metadata", {}),
                        start_time=run.start_time.isoformat(timespec="milliseconds"),
                        streamed_output_str=[],
                        final_output=None,
                        end_time=None,
                    ),
                }
            )
        )
    def _on_run_update(self, run: Run) -> None:
        """Finish a run."""
        try:
            index = self._index_map.get(run.id)
            if index is None:
                return
            self.send_stream.send_nowait(
                RunLogPatch(
                    {
                        "op": "add",