DanielLeens opened a new pull request, #13642:
URL: https://github.com/apache/seatunnel/pull/13642

   Yes, I am contributing to Apache SeaTunnel.
   
   This adds native fixed-slot capacity and opt-in per-submission status 
metrics so operators can alert on slot exhaustion and identify failed job 
IDs/names without polling REST JSON. Related: #13501.
   
   The active master exports `seatunnel_cluster_slots_total`, 
`seatunnel_cluster_slots_assigned`, and `seatunnel_cluster_slots_unassigned` 
from one observed worker-profile collection. Each scrape satisfies `total = 
assigned + unassigned`. Dynamic and mixed-mode worker sets omit these 
finite-capacity gauges. Cluster totals include all registered workers and are 
not tag-filtered.
   
   With `engine.telemetry.metric.job-status-enabled: true` (default false), the 
active master also exports `seatunnel_job_status{cluster,job_id,job_name}`, 
`seatunnel_job_submit_time_seconds{cluster,job_id,job_name}`, and 
`seatunnel_job_terminal_metrics_truncated{cluster}`. Status values use an 
explicit documented numeric mapping. Live state takes precedence over 
pending/history for the same ID. Terminal history is limited to records 
finished in the last five minutes, capped at 1000 returned terminal records, 
with a conservative overflow signal. Bounded key selection followed by a 
six-field projection avoids transporting nested pipeline/task state. The opt-in 
and paging bound added exposure/returned data; owner-side history scanning 
still occurs.
   
   Existing aggregate `job_count`, REST payloads, history retention, 
scheduling, checkpoint/savepoint state and execution recovery are unchanged. No 
dependencies, POMs or serialization hooks change. The new snapshot is local to 
telemetry. Collectors describe their names without querying coordinator state 
during registration and omit samples when coordinator/master ownership is 
unavailable.
   
   A new ID is a new submission. The engine deliberately does not infer logical 
identity or suppress another submission's failure from a matching name. 
Documentation includes explicit current-attempt mapping for recovery alerts, 
and explains why a disappearing terminal series or finite-window latest-by-name 
selection cannot prove recovery. This PR addresses native metric availability; 
business identity/attempt ownership remains with the submitting application.
   
   Validation:
   
   - Scoped `./mvnw spotless:apply spotless:check -pl 
seatunnel-engine/seatunnel-engine-common,seatunnel-engine/seatunnel-engine-server,seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base
 -nsu -Dmaven.gitcommitid.skip=true` passed.
   - `git diff --check` passed.
   - Added/extended coverage for real YAML opt-in parsing, collector 
registration/startup guards, real Hazelcast history paging and time bounds, 
real fixed-slot allocation/release and master failover, failed execution and 
same-name resubmission, same-ID live/history overlap, and both HTTP 
Prometheus/OpenMetrics serializers.
   - Local compilation, UT execution, integration/E2E execution, packaging, 
Docker and service startup were not run under this task's SeaTunnel validation 
policy. Functional validation requires GitHub CI on this PR head; added tests 
are not claimed as passing.
   - `seatunnel-engine-ui` was not changed or built. No build or deployment 
artifacts were reused.
   
   Remaining operational limits: heartbeat-derived capacity is not an atomic 
reservation snapshot; terminal metrics are bounded observations rather than a 
durable failure event log; query paging does not bound owner-side scan CPU; 
master target changes still require normal Prometheus staleness handling. Both 
telemetry documentation paths describe these limits and the exact metric 
contract.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to