@@ -21,7 +21,6 @@ type ArcUsage struct {
2121 Timestamp int64 `json:"timestamp"`
2222 SubscriptionID string `json:"subscription_id"`
2323 Quantity int `json:"quantity"`
24- Email string `json:"email"`
2524}
2625
2726type ArcUsageResponse struct {
@@ -36,7 +35,6 @@ type ArcUsageResponse struct {
3635const (
3736 envEsURL = "ES_CLUSTER_URL"
3837 arcIdentifier = "ARC_ID"
39- emailID = "EMAIL"
4038 subscriptionID = "SUBSCRIPTION_ID"
4139)
4240
@@ -98,15 +96,11 @@ func ReportUsage() {
9896 log .Fatalln ("ES_CLUSTER_URL not found" )
9997 }
10098 arcID := os .Getenv (arcIdentifier )
101- if url == "" {
99+ if arcID == "" {
102100 log .Fatalln ("ARC_ID not found" )
103101 }
104- email := os .Getenv (emailID )
105- if url == "" {
106- log .Fatalln ("EMAIL not found" )
107- }
108102 subID := os .Getenv (subscriptionID )
109- if url == "" {
103+ if subID == "" {
110104 log .Println ("SUBSCRIPTION_ID not found. Initializing in trial mode" )
111105 }
112106 nodeCount , err := FetchNodeCount (url )
@@ -115,7 +109,6 @@ func ReportUsage() {
115109 }
116110 usageBody := ArcUsage {}
117111 usageBody .ArcID = arcID
118- usageBody .Email = email
119112 usageBody .SubscriptionID = subID
120113 usageBody .Timestamp = time .Now ().Unix ()
121114 usageBody .Quantity = nodeCount
0 commit comments