mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-26 11:00:38 +00:00
fix(telemetry): init telemetry in cloud bundle entry points (#3346)
Cloud bundles (hetzner.js, digitalocean.js, etc.) never called initTelemetry(), so _enabled was false and every captureEvent/trackFunnel call in orchestrate.ts was a silent no-op. All orchestration funnel events (funnel_cloud_authed through funnel_handoff) were lost. Adds initTelemetry(pkg.version) to all 7 cloud entry points so funnel events actually reach PostHog. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
75a22f2d06
commit
71c61ed7e7
8 changed files with 22 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@openrouter/spawn",
|
||||
"version": "1.0.20",
|
||||
"version": "1.0.21",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"spawn": "cli.js"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@
|
|||
import type { CloudOrchestrator } from "../shared/orchestrate.js";
|
||||
|
||||
import { getErrorMessage } from "@openrouter/spawn-shared";
|
||||
import pkg from "../../package.json" with { type: "json" };
|
||||
import { runOrchestration } from "../shared/orchestrate.js";
|
||||
import { initTelemetry } from "../shared/telemetry.js";
|
||||
import { agents, resolveAgent } from "./agents.js";
|
||||
import {
|
||||
authenticate,
|
||||
|
|
@ -72,6 +74,7 @@ async function main() {
|
|||
await runOrchestration(cloud, agent, agentName);
|
||||
}
|
||||
|
||||
initTelemetry(pkg.version);
|
||||
main().catch((err) => {
|
||||
process.stderr.write(`\x1b[0;31mFatal: ${getErrorMessage(err)}\x1b[0m\n`);
|
||||
process.exit(1);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@
|
|||
import type { CloudOrchestrator } from "../shared/orchestrate.js";
|
||||
|
||||
import { getErrorMessage } from "@openrouter/spawn-shared";
|
||||
import pkg from "../../package.json" with { type: "json" };
|
||||
import { runOrchestration } from "../shared/orchestrate.js";
|
||||
import { initTelemetry } from "../shared/telemetry.js";
|
||||
import { agents, resolveAgent } from "./agents.js";
|
||||
import {
|
||||
createServer,
|
||||
|
|
@ -66,6 +68,7 @@ async function main() {
|
|||
await runOrchestration(cloud, agent, agentName);
|
||||
}
|
||||
|
||||
initTelemetry(pkg.version);
|
||||
main().catch((err) => {
|
||||
process.stderr.write(`\x1b[0;31mFatal: ${getErrorMessage(err)}\x1b[0m\n`);
|
||||
process.exit(1);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@
|
|||
import type { CloudOrchestrator } from "../shared/orchestrate.js";
|
||||
|
||||
import { getErrorMessage } from "@openrouter/spawn-shared";
|
||||
import pkg from "../../package.json" with { type: "json" };
|
||||
import { runOrchestration } from "../shared/orchestrate.js";
|
||||
import { initTelemetry } from "../shared/telemetry.js";
|
||||
import { logInfo } from "../shared/ui.js";
|
||||
import { agents, resolveAgent } from "./agents.js";
|
||||
import {
|
||||
|
|
@ -108,6 +110,7 @@ async function main() {
|
|||
await runOrchestration(cloud, agent, agentName);
|
||||
}
|
||||
|
||||
initTelemetry(pkg.version);
|
||||
main().catch((err) => {
|
||||
process.stderr.write(`\x1b[0;31mFatal: ${getErrorMessage(err)}\x1b[0m\n`);
|
||||
process.exit(1);
|
||||
|
|
|
|||
|
|
@ -5,8 +5,10 @@
|
|||
import type { CloudOrchestrator } from "../shared/orchestrate.js";
|
||||
|
||||
import { getErrorMessage } from "@openrouter/spawn-shared";
|
||||
import pkg from "../../package.json" with { type: "json" };
|
||||
import { shouldSkipCloudInit } from "../shared/cloud-init.js";
|
||||
import { DOCKER_CONTAINER_NAME, DOCKER_REGISTRY, makeDockerRunner, runOrchestration } from "../shared/orchestrate.js";
|
||||
import { initTelemetry } from "../shared/telemetry.js";
|
||||
import { logInfo, logStep, shellQuote } from "../shared/ui.js";
|
||||
import { agents, resolveAgent } from "./agents.js";
|
||||
import {
|
||||
|
|
@ -118,6 +120,7 @@ async function main() {
|
|||
await runOrchestration(cloud, agent, agentName);
|
||||
}
|
||||
|
||||
initTelemetry(pkg.version);
|
||||
main().catch((err) => {
|
||||
process.stderr.write(`\x1b[0;31mFatal: ${getErrorMessage(err)}\x1b[0m\n`);
|
||||
process.exit(1);
|
||||
|
|
|
|||
|
|
@ -5,8 +5,10 @@
|
|||
import type { CloudOrchestrator } from "../shared/orchestrate.js";
|
||||
|
||||
import { getErrorMessage } from "@openrouter/spawn-shared";
|
||||
import pkg from "../../package.json" with { type: "json" };
|
||||
import { shouldSkipCloudInit } from "../shared/cloud-init.js";
|
||||
import { DOCKER_CONTAINER_NAME, DOCKER_REGISTRY, makeDockerRunner, runOrchestration } from "../shared/orchestrate.js";
|
||||
import { initTelemetry } from "../shared/telemetry.js";
|
||||
import { logInfo, logStep, shellQuote } from "../shared/ui.js";
|
||||
import { agents, resolveAgent } from "./agents.js";
|
||||
import {
|
||||
|
|
@ -124,6 +126,7 @@ async function main() {
|
|||
await runOrchestration(cloud, agent, agentName);
|
||||
}
|
||||
|
||||
initTelemetry(pkg.version);
|
||||
main().catch((err) => {
|
||||
process.stderr.write(`\x1b[0;31mFatal: ${getErrorMessage(err)}\x1b[0m\n`);
|
||||
process.exit(1);
|
||||
|
|
|
|||
|
|
@ -6,8 +6,10 @@ import type { CloudOrchestrator } from "../shared/orchestrate.js";
|
|||
|
||||
import * as p from "@clack/prompts";
|
||||
import { getErrorMessage } from "@openrouter/spawn-shared";
|
||||
import pkg from "../../package.json" with { type: "json" };
|
||||
import { createCloudAgents } from "../shared/agent-setup.js";
|
||||
import { makeDockerRunner, runOrchestration } from "../shared/orchestrate.js";
|
||||
import { initTelemetry } from "../shared/telemetry.js";
|
||||
import { logWarn } from "../shared/ui.js";
|
||||
import { agents, resolveAgent } from "./agents.js";
|
||||
import {
|
||||
|
|
@ -117,6 +119,7 @@ async function main() {
|
|||
await runOrchestration(cloud, agent, agentName);
|
||||
}
|
||||
|
||||
initTelemetry(pkg.version);
|
||||
main().catch((err) => {
|
||||
process.stderr.write(`\x1b[0;31mFatal: ${getErrorMessage(err)}\x1b[0m\n`);
|
||||
process.exit(1);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@
|
|||
import type { CloudOrchestrator } from "../shared/orchestrate.js";
|
||||
|
||||
import { getErrorMessage } from "@openrouter/spawn-shared";
|
||||
import pkg from "../../package.json" with { type: "json" };
|
||||
import { runOrchestration } from "../shared/orchestrate.js";
|
||||
import { initTelemetry } from "../shared/telemetry.js";
|
||||
import { agents, resolveAgent } from "./agents.js";
|
||||
import {
|
||||
createSprite,
|
||||
|
|
@ -71,6 +73,7 @@ async function main() {
|
|||
await runOrchestration(cloud, agent, agentName);
|
||||
}
|
||||
|
||||
initTelemetry(pkg.version);
|
||||
main().catch((err) => {
|
||||
process.stderr.write(`\x1b[0;31mFatal: ${getErrorMessage(err)}\x1b[0m\n`);
|
||||
process.exit(1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue