QRun-IO/ci-policy: ci / fork-guard (pull_request) Skipped
QRun-IO/ci-policy: native / fork-deny (pull_request) Skipped
QRun-IO/ci-policy: native / dotnet-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / Scoped workflow [workflow 60e5a80ed7a5a67877bfb3e129b1929c83464b6e] (pull_request) Successful in 12s
QRun-IO/ci-policy: ci / head-profile (pull_request) Skipped
QRun-IO/ci-policy: ci / repository-policy (pull_request) Skipped
QRun-IO/ci-policy: ci / application-template-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / gradle-1 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-core-2-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-3 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-3-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-4 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-5 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7-head (pull_request) Skipped
QRun-IO/ci-policy: ci / node-8 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-9 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-10 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-playwright-11 (pull_request) Skipped
QRun-IO/ci-policy: ci / repository-policy-12 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-13 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-14 (pull_request) Skipped
QRun-IO/ci-policy: ci / android-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / original-business (pull_request) Skipped
QRun-IO/ci-policy: ci / original-mcp (pull_request) Skipped
QRun-IO/ci-policy: ci / original-voyage (pull_request) Skipped
QRun-IO/ci-policy: ci / original-cli (pull_request) Skipped
QRun-IO/ci-policy: ci / not-enrolled (pull_request) Skipped
QRun-IO/ci-policy: ci / shared-pipeline (pull_request) Skipped
QRun-IO/ci-policy: native / native-result (pull_request) Successful in 9s
Shared Java Maven CI / secrets (push) Successful in 38s
QRun-IO/ci-policy: Shared Java Maven CI / secrets (pull_request) Successful in 37s
Shared Java Maven CI / gate (push) Canceled after 0s
Shared Java Maven CI / verify (push) Canceled after 0s
qrun-release / release (push) Canceled after 5m21s
qrun-release / postpublish (push) Canceled after 0s
QRun-IO/ci-policy: Shared Java Maven CI / verify (pull_request) Successful in 54s
QRun-IO/ci-policy: Shared Java Maven CI / gate (pull_request) Successful in 22s
QRun-IO/ci-policy: ci / java-maven-6 (pull_request) Successful in 42m16s
QRun-IO/ci-policy: ci / ci-result (pull_request) Successful in 11s
Release candidate / release-rc (pull_request) Skipped
Import qqq-bom-pom 4.1.0-RC.21 unconditionally ahead of the parent's BOM and remove the opt-in qqq-snapshot profile and its Sonatype snapshot repository. State the minimum QQQ version as 4.1.0+ in the README. The development revision and the parent are unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
136 lines
3.3 KiB
Markdown
136 lines
3.3 KiB
Markdown
# qbit-standard-process-trace
|
|
|
|
Process execution tracing and logging for QQQ applications.
|
|
|
|
**For:** QQQ developers who need visibility into ETL process execution
|
|
**Status:** Stable
|
|
|
|
## Why This Exists
|
|
|
|
ETL processes run in the background. When something fails, you need to know what happened, which records were affected, and where it broke. Adding logging to every process is repetitive and inconsistent.
|
|
|
|
This QBit provides automatic tracing for QQQ processes. Every execution is logged with timing, record counts, and error details. No code changes required in your processes.
|
|
|
|
## Features
|
|
|
|
- **Automatic Tracing** - Captures all process executions without code changes
|
|
- **Step-Level Detail** - Timing and status for each step in multi-step processes
|
|
- **Record Tracking** - Input/output counts and error record IDs
|
|
- **Error Capture** - Full stack traces and error messages
|
|
- **Dashboard View** - Process history visible in the QQQ dashboard
|
|
- **Retention Policies** - Automatic cleanup of old trace data
|
|
|
|
## Quick Start
|
|
|
|
### Prerequisites
|
|
|
|
- QQQ application (v4.1.0+)
|
|
- Database backend configured
|
|
|
|
### Installation
|
|
|
|
Add to your `pom.xml`:
|
|
|
|
```xml
|
|
<dependency>
|
|
<groupId>com.kingsrook.qbits</groupId>
|
|
<artifactId>qbit-standard-process-trace</artifactId>
|
|
<version>0.2.0</version>
|
|
</dependency>
|
|
```
|
|
|
|
### Register the QBit
|
|
|
|
```java
|
|
public class AppMetaProvider extends QMetaProvider {
|
|
@Override
|
|
public void configure(QInstance qInstance) {
|
|
new StandardProcessTraceQBit().configure(qInstance);
|
|
}
|
|
}
|
|
```
|
|
|
|
That's it. All processes are now traced automatically.
|
|
|
|
## Usage
|
|
|
|
### Viewing Traces
|
|
|
|
Traces appear in the dashboard under the Process Trace screen. Each trace shows:
|
|
|
|
- Process name and start time
|
|
- Duration
|
|
- Status (success, error, warning)
|
|
- Record counts (input, output, error)
|
|
- Step-by-step breakdown
|
|
|
|
### Querying Traces Programmatically
|
|
|
|
```java
|
|
QueryInput query = new QueryInput()
|
|
.withTableName("process_trace")
|
|
.withFilter(new QQueryFilter()
|
|
.withCriteria("processName", Operator.EQUALS, "orderSync")
|
|
.withCriteria("status", Operator.EQUALS, "ERROR"))
|
|
.withOrderBy(new QFilterOrderBy("startTime", false));
|
|
```
|
|
|
|
### Custom Trace Data
|
|
|
|
Add custom data to the current trace:
|
|
|
|
```java
|
|
ProcessTraceContext.current()
|
|
.withCustomField("batchId", batchId)
|
|
.withCustomField("sourceSystem", "ERP");
|
|
```
|
|
|
|
### Selective Tracing
|
|
|
|
Disable tracing for specific processes:
|
|
|
|
```java
|
|
new QProcessMetaData()
|
|
.withName("frequentHealthCheck")
|
|
.withTracingEnabled(false); // Don't log every execution
|
|
```
|
|
|
|
## Configuration
|
|
|
|
The QBit creates these tables:
|
|
|
|
| Table | Purpose |
|
|
|-------|---------|
|
|
| `process_trace` | Execution summary records |
|
|
| `process_trace_step` | Step-level detail |
|
|
| `process_trace_error` | Error records with details |
|
|
|
|
### Retention
|
|
|
|
```java
|
|
new StandardProcessTraceQBit()
|
|
.withRetentionDays(30) // Keep traces for 30 days
|
|
.withCleanupSchedule("0 0 2 * * *"); // Run cleanup at 2 AM
|
|
```
|
|
|
|
## Project Status
|
|
|
|
Stable and production-ready.
|
|
|
|
### Roadmap
|
|
|
|
- Trace aggregation and statistics
|
|
- Alerting on repeated failures
|
|
- Export to external monitoring systems
|
|
|
|
## Contributing
|
|
|
|
1. Fork the repository
|
|
2. Create a feature branch
|
|
3. Run tests: `mvn clean verify`
|
|
4. Submit a pull request
|
|
|
|
## License
|
|
|
|
Apache-2.0 - See [LICENSE](LICENSE) and [NOTICE](NOTICE).
|