Skip to content

Commit

Permalink
PatchEnvelopes: move patchEnvelope AppInst usage from App to Metrics
Browse files Browse the repository at this point in the history
PatchEnvelope AppInst usage is metric, not info. In order for us to
provide consistent updates on patch envelope app usage, we will have to
send information about app which can increase network load.

In contrast, metrics send could be configured on how often they will be sent

Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
  • Loading branch information
uncleDecart committed Dec 13, 2023
1 parent 8be6b4e commit 2293027
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
6 changes: 2 additions & 4 deletions proto/info/info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,8 @@ message ZInfoSnapshot {
}

message ZInfoApp {
reserved 9 to 11, 19; // deprecated

string AppID = 1;
string appVersion = 2;

Expand All @@ -920,8 +922,6 @@ message ZInfoApp {

// EVE stopped sending this. Can be removed.
repeated ZInfoSW softwareList = 8; // XXX to be deprecated in favor of volumeRefs
// deprecated = 9;
// deprecated = 11;

google.protobuf.Timestamp bootTime = 12;
repeated ZioBundle assignedAdapters = 13;
Expand All @@ -930,8 +930,6 @@ message ZInfoApp {
repeated ZInfoNetwork network = 16; // up/down; allocated IP
repeated string volumeRefs = 17; // volume UUIDs
repeated ZInfoSnapshot snapshots = 18; // optional field, used to send list of snapshots on device
// optional; information about usage of every patchEnvelope assigned to app
repeated ZInfoPatchEnvelopeUsage patchEnvelope = 19;
}

// ipSec state information
Expand Down
13 changes: 0 additions & 13 deletions proto/info/patch_envelope.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,3 @@ message ZInfoPatchEnvelope {
uint64 size = 5;
repeated string errors = 6;
}

// Provide information on PatchEnvelope usage per app
message ZInfoPatchEnvelopeUsage {
// UUID of PatchEnvelope
string uuid = 1;
// Version of PatchEnvelope
string version = 2;
// count the number of times app instance called patch APIs
uint64 patch_api_call_count = 3;
// count the number of times app instance actually downloaded
// whole patch envelope or part of it
uint64 download_count = 4;
}
15 changes: 15 additions & 0 deletions proto/metrics/metrics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,21 @@ message appMetric {
repeated appContainerMetric container = 7;

AppMemoryMetric appMemory = 8;

repeated AppPatchEnvelopeMetric patch_envelope = 9;
}

// Provide information on PatchEnvelope usage per app
message AppPatchEnvelopeMetric {
// UUID of PatchEnvelope
string uuid = 1;
// Version of PatchEnvelope
string version = 2;
// count the number of times app instance called patch APIs
uint64 patch_api_call_count = 3;
// count the number of times app instance actually downloaded
// whole patch envelope or part of it
uint64 download_count = 4;
}

// We track device and app logs separately with these counters.
Expand Down

0 comments on commit 2293027

Please sign in to comment.