Skip to content
LambogeniusDocs

Integration Migration Tool

Per-stage token usage

Read the model usage notification at the end of each executed batch stage, and keep the usage reports.

Current compatibility routeBizTalk → Azure Integration ServicesThese docs describe the current buildable implementation.

Read the usage notification at the end of each executed batch stage

Full batch runs, including a batch with one solution, print recorded model usage when precheck, discovery, planning, conversion, test, packaging, and cost estimation finish or fail. Info logging is sufficient; no additional usage switch is needed. Save the notifications with --log-file ./logs/batch.log.

Illustrative log excerpts, not measured migration results or current Azure prices:

✓ [orders] Planning finished. Model tokens: 24,000 (20,000 input + 4,000 output across 5 calls). Open report: .../planning-summary.md
✓ [orders] Deployment package finished. Model tokens: 0 (0 input + 0 output across 0 calls). Open report: .../manifest.md
[orders] Estimated Azure cost: CAD <amount>/month (canadacentral).
✓ [orders] Cost estimation finished. Model tokens: 0 (0 input + 0 output across 0 calls). Open report: .../azure-cost-estimate-<timestamp>.md
✗ [orders] Conversion failed: Policy validation failed. Model tokens: 0 (0 input + 0 output across 0 calls)
  • Input tokens are recorded prompt/context usage; output tokens are recorded generated responses. Total is input plus output.
  • Calls counts recorded model invocations, not Azure pricing HTTP requests. The report link opens stage evidence.
  • Zero tokens for deterministic packaging and cost estimation is expected; it does not mean Azure hosting is free.
  • Skipped stages print already complete; skipped; their reports show no new stage usage. Stages not reached after a failure have no completion notice. A hard crash may prevent final notifications and usage reports from being written.

Keep the per-solution and batch reports

reports/<solution-id>/token-usage.md
reports/<solution-id>/token-usage.json
reports/migration-batch-<timestamp>.md
reports/migration-batch-<timestamp>.json

These paths assume reportDirectory: ./reports. Reports record per-stage input, output, total tokens, calls, exact/estimated count quality, and model execution duration. The final batch summary gives aggregate tokens and calls. Per-solution usage files are replaced on the next attempt; preserve them with the timestamped batch reports when you need history. Resume totals cover this attempt, not all prior runs.

Single-stage and accounting limitations

Direct single-stage commands and individual interactive actions do not currently initialize the batch token tracker or produce these usage files. Interactive full batch conversion does. Missing telemetry is not zero usage. Provider-reported counts are used where available, otherwise counts may be estimated; failed or interrupted requests may consume tokens without being recorded. Reconcile charges with your provider, not these operational totals. Azure cost estimates, AI provider charges, and Lambogenius license metering are separate.