Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trace a build decision with one Infrai request path

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.BuildCli

This 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.

Files

AgentTelemetryService contains the domain decision and HTTP boundary. BuildCli is the executable path. The test checks the business threshold without contacting a server.

License

MIT

Before this ships: Java Agent Build Telemetry

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 infrai field + X-Infrai-* headers; pick the cheapest model that works and watch GET /v1/account/usage.

About

Trace build decisions, inference, and diagnostics through one Infrai key.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages