Instrument existing automation
Register a script first. Save its runtime token securely, not in source control. The SDK communicates with your customer installation, not the publisher website.
Python (3.10+)
Copy lipilog.py from the installed integration/ directory next to your automation, or add that directory to PYTHONPATH. Configure LIPILOG_URL and LIPILOG_TOKEN in the execution environment. The Python SDK is synchronous acknowledged HTTP and raises on transport failure; it is not an offline spool.
from lipilog import LipiLog
with LipiLog(environment="production", version="1.0") as log:
with log.checkpoint("Load records", key="load"):
records = [1, 2, 3] # Replace with existing work.
log.log("Loaded records", records=len(records))
with log.checkpoint("Process records", key="process"):
for record in records:
log.log("Processed record", record_id=record)
log.fields["records"] = len(records)
Use log.heartbeat() in long-running work and log.log(message, level="WARN") for warnings. Exceptions record failed checkpoints/run and propagate. Decide explicitly how telemetry failures affect your automation. Do not include personal data or credentials unless required and authorized.
PowerShell (7.4+)
From the extracted customer package use the shipped runnable demonstration. It prompts securely for a script token and generates synthetic telemetry only.
pwsh -NoProfile -File ./integration/Demo-LipiLog.ps1 -ModulePath ./integration/LipiLog.psm1 -ServerUrl http://localhost:8080 -Scenario Success
pwsh -NoProfile -File ./integration/Demo-LipiLog.ps1 -ModulePath ./integration/LipiLog.psm1 -Scenario Failure
pwsh -NoProfile -File ./integration/Demo-LipiLog.ps1 -ModulePath ./integration/LipiLog.psm1 -Transport Udp -UdpPort 8091
Use Invoke-LoggedScript, Invoke-ScriptStep, Write-ScriptLog and Get-ScriptLogStatus as demonstrated in the shipped example. Review its options for live/end delivery and UDP. TCP is recommended where every event matters. UDP applies to eligible logs; lifecycle boundaries remain HTTP. See the API reference for exact transport semantics.
Source downloads
Direct HTTP API
Use Authorization: Bearer sl_... for runtime calls. Start a run, then POST batches with stable UUIDs and run-local sequence numbers. Each batch is atomic. Retry transient errors with backoff and reuse the same event IDs. Do not send stale example timestamps. See API reference for schemas and limits.
For external analytics, create a scoped ll_read_ credential and use GET /api/v1/telemetry/script, /api/v1/telemetry/runs, /api/v1/telemetry/runs/{id}/checkpoints and /api/v1/telemetry/logs. These are read-only and separate from runtime ingestion. Respect expiry, scope and pagination.