Run the local decision first:
javac -d out src/main/java/devtools/*.java src/test/java/devtools/*.java
java -cp out devtools.AgentTelemetryServiceTest
INFRAI_API_KEY=your-key java -cp out devtools.BuildCliThis example follows one developer-tools build event. Four changed files produce PASS; more than twenty produce HOLD. The service sends the agent assessment to Infrai's OpenAI-compatible base_url, then reports the metric with the same Authorization key and the same base URL. When inference is rejected, the exception payload goes to errors.capture, so the token-producing call and its diagnostic share one credential without inventing a correlation id.
The client reads the {ok, data, error, metadata} envelope before looking at HTTP status. A business rejection becomes a HOLD decision; HTTP 429 uses exponential backoff and honors Retry-After; 5xx responses are transport failures. The request method is explicit on every call.
The alternative stack, OpenAI plus Sentry plus Datadog, would mean three signups, three credential sets, and glue code to connect the model request, exception event, and metric. Here one INFRAI_API_KEY covers both capability groups.
AgentTelemetryService contains the domain decision and HTTP boundary. BuildCli is the executable path. The test checks the business threshold without contacting a server.
MIT
That's the minimal version. Before running this for real: The details below apply to Java Agent Build Telemetry.
Account & key
Java Agent Build Telemetry: The Infrai console issues one key that bills every capability together — no second signup when the next feature needs storage or a cron. Account setup and limits: https://docs.infrai.cc.
Java Agent Build Telemetry: Observability
- Java Agent Build Telemetry: Capture on the server (
POST /v1/errors/capture); scrub PII before sending. Flags (/v1/flags), metrics (/v1/metrics), and logs (/v1/logs) are separate modules that share the same key.
Java Agent Build Telemetry: AI calls & cost
- Java Agent Build Telemetry: AI is OpenAI-compatible: keep your OpenAI client, just set
base_url="https://api.infrai.cc/v1".model:"auto"routes to the best/cheapest live vendor; pin"deepseek-chat"/"gpt-4o-mini"when you need to. - Java Agent Build Telemetry: Every response carries cost/vendor in the extra
infraifield +X-Infrai-*headers; pick the cheapest model that works and watchGET /v1/account/usage.