OpenAIOpenAIAn AI provider whose APIs and models are commonly used for text generation, coding, reasoning, embeddings, and agent workflows.View glossary entrySource: OpenAI token guide jobs
Track OpenAI Job TokenstokensThe pieces of text an AI model processes. Token counts are often used to measure usage and calculate model cost.View glossary entrySource: OpenAI token guide, CostcostThe money associated with a run, often estimated from token usage and provider pricing. TelemHQ can store cost fields when your job sends them.View glossary entrySource: OpenAI token guide, And LatencylatencyHow long a request or job takes to respond. AI job latency helps teams spot slow model calls, overloaded workers, or expensive retries.View glossary entrySource: MDN glossary With One POSTPOSTAn HTTP method used to send data to a server. TelemHQ pings use POST when a job reports a run and optional payload.View glossary entrySource: MDN HTTP docs
Add one TelemHQ pingpingA request sent to TelemHQ after a job runs. A ping can be a simple heartbeat or include JSON payload data about what happened.View glossary entrySource: TelemHQ docs after an OpenAI job runs so future-you can see modelmodelThe AI system that processes input and returns output. For monitoring, the model name helps explain which tool or provider produced a run and how its token usage should be priced.View glossary entrySource: Anthropic model docs, token usage, estimated cost, latency, processed items, failures, and quality checks in one run historyrun historyThe stored record of previous job runs. TelemHQ uses run history to show payloads, failures, timing, token totals, and trends over time.View glossary entrySource: TelemHQ docs.
1. Create A TrackertrackerA monitored job, AI pipeline, worker, script, or automation in TelemHQ. Each tracker has its own ping URL and run history.View glossary entrySource: TelemHQ docs
Create a TelemHQ tracker for the OpenAI job. Add a croncronA Unix-style scheduler for recurring commands. TelemHQ uses cron schedules to know when a tracker should receive its next ping.View glossary entrySource: AWS EventBridge Scheduler docs schedule if the job should run on time, or leave the schedule blank for queue workersworkerA background process that performs work outside the main request path, such as syncing data, generating reports, or running AI tasks.View glossary entrySource: GitHub Actions CI docs, agentsagentAn AI application that uses a model, instructions, state, and tools to work toward a goal. Agents are useful to monitor because they can run for a while and make multiple tool calls.View glossary entrySource: Google Cloud Generative AI glossary, and manually triggered jobs.
Copy the tracker ping URL. It will look like
https://telemhq.com/ping/YOUR_TOKEN.
2. Send Operational MetadatametadataData about a run rather than the private content of the run itself, such as model name, duration, branch, item counts, or token totals.View glossary entrySource: MDN API glossary
Keep prompts, completions, retrieved documents, and customer content out of the payloadpayloadThe structured data sent with a request. In TelemHQ, payloads should contain safe operational metadata, not prompts, completions, secrets, customer data, or private paths.View glossary entrySource: MDN API glossary unless you intentionally want them stored. For most jobs, operational metadata is enough.
{
"provider": "openai",
"model": "gpt-5",
"project": "support-digest",
"status": "success",
"input_tokens": 8120,
"output_tokens": 940,
"total_tokens": 9060,
"latency_ms": 1840,
"cost_usd": 0.42,
"items_processed": 128,
"items_failed": 0,
"eval_score": 0.91
}
3. Add The Ping In Node.js
import OpenAI from "openai";
const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
const model = process.env.OPENAI_MODEL || "gpt-5";
const startedAt = Date.now();
try {
const response = await client.responses.create({
model,
input: "Summarize today's support tickets."
});
const usage = response.usage || {};
await fetch(process.env.TELEMHQ_PING_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
provider: "openai",
model: response.model || model,
project: "support-digest",
status: "success",
input_tokens: usage.input_tokens || 0,
output_tokens: usage.output_tokens || 0,
total_tokens: usage.total_tokens || 0,
latency_ms: Date.now() - startedAt,
items_processed: 1,
items_failed: 0
})
});
} catch (error) {
await fetch(process.env.TELEMHQ_PING_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
provider: "openai",
model,
project: "support-digest",
status: "error",
latency_ms: Date.now() - startedAt,
items_processed: 0,
items_failed: 1,
error: error instanceof Error ? error.message : "Unknown error"
})
});
throw error;
}
4. Add Payload AssertionsassertionA rule that checks payload data after a run. Assertions can flag a job as unhealthy even if the process technically completed.View glossary entrySource: TelemHQ docs
Assertions catch silent failures: jobs that technically finish but report bad run data.
status = successitems_processed > 0items_failed = 0cost_usd <= your budgeteval_score >= your quality threshold
For fuller examples, see the OpenAI pipeline guide.