mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-19 11:35:55 +01:00
feat: add execution_id to all telemetry payloads
- Generate EXECUTION_ID from RANDOM_UUID in variables() - Export EXECUTION_ID to container environment - Add execution_id field to all 8 API payloads in api.func - Add execution_id to post_progress_to_api in install.func and alpine-install.func - Fallback to RANDOM_UUID when EXECUTION_ID not set (backward compat)
This commit is contained in:
@@ -552,6 +552,7 @@ post_to_api() {
|
||||
cat <<EOF
|
||||
{
|
||||
"random_id": "${RANDOM_UUID}",
|
||||
"execution_id": "${EXECUTION_ID:-${RANDOM_UUID}}",
|
||||
"type": "lxc",
|
||||
"nsapp": "${NSAPP:-unknown}",
|
||||
"status": "installing",
|
||||
@@ -656,6 +657,7 @@ post_to_api_vm() {
|
||||
cat <<EOF
|
||||
{
|
||||
"random_id": "${RANDOM_UUID}",
|
||||
"execution_id": "${EXECUTION_ID:-${RANDOM_UUID}}",
|
||||
"type": "vm",
|
||||
"nsapp": "${NSAPP:-unknown}",
|
||||
"status": "installing",
|
||||
@@ -788,6 +790,7 @@ post_update_to_api() {
|
||||
cat <<EOF
|
||||
{
|
||||
"random_id": "${RANDOM_UUID}",
|
||||
"execution_id": "${EXECUTION_ID:-${RANDOM_UUID}}",
|
||||
"type": "${TELEMETRY_TYPE:-lxc}",
|
||||
"nsapp": "${NSAPP:-unknown}",
|
||||
"status": "${pb_status}",
|
||||
@@ -830,6 +833,7 @@ EOF
|
||||
cat <<EOF
|
||||
{
|
||||
"random_id": "${RANDOM_UUID}",
|
||||
"execution_id": "${EXECUTION_ID:-${RANDOM_UUID}}",
|
||||
"type": "${TELEMETRY_TYPE:-lxc}",
|
||||
"nsapp": "${NSAPP:-unknown}",
|
||||
"status": "${pb_status}",
|
||||
@@ -872,6 +876,7 @@ EOF
|
||||
cat <<EOF
|
||||
{
|
||||
"random_id": "${RANDOM_UUID}",
|
||||
"execution_id": "${EXECUTION_ID:-${RANDOM_UUID}}",
|
||||
"type": "${TELEMETRY_TYPE:-lxc}",
|
||||
"nsapp": "${NSAPP:-unknown}",
|
||||
"status": "${pb_status}",
|
||||
@@ -1088,6 +1093,7 @@ post_tool_to_api() {
|
||||
cat <<EOF
|
||||
{
|
||||
"random_id": "${uuid}",
|
||||
"execution_id": "${EXECUTION_ID:-${uuid}}",
|
||||
"type": "tool",
|
||||
"nsapp": "${tool_name}",
|
||||
"status": "${status}",
|
||||
@@ -1155,6 +1161,7 @@ post_addon_to_api() {
|
||||
cat <<EOF
|
||||
{
|
||||
"random_id": "${uuid}",
|
||||
"execution_id": "${EXECUTION_ID:-${uuid}}",
|
||||
"type": "addon",
|
||||
"nsapp": "${addon_name}",
|
||||
"status": "${status}",
|
||||
@@ -1246,6 +1253,7 @@ post_update_to_api_extended() {
|
||||
cat <<EOF
|
||||
{
|
||||
"random_id": "${RANDOM_UUID}",
|
||||
"execution_id": "${EXECUTION_ID:-${RANDOM_UUID}}",
|
||||
"type": "${TELEMETRY_TYPE:-lxc}",
|
||||
"nsapp": "${NSAPP:-unknown}",
|
||||
"status": "${pb_status}",
|
||||
|
||||
Reference in New Issue
Block a user