kubernetes-retired / spartakus

[EOL] Anonymous Usage Collector
Apache License 2.0
74 stars 30 forks source link

Add timestamp to all reports #13

Closed squat closed 7 years ago

squat commented 7 years ago

Currently, the timestamp field is only added to reports that are processed with a Spartakus collector. If you run the volunteer with --database=stdout or even --database=bigquery://... your records will have no timestamp. This commit adds the timestamp field to reports at the time of creation in the volunteer.

k8s-ci-robot commented 7 years ago

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA.

Once you've signed, please reply here (e.g. "I signed it!") and we'll verify. Thanks.


If you have questions or suggestions related to this bot's behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
squat commented 7 years ago

fixes: #12

philips commented 7 years ago

LGTM

thockin commented 7 years ago

sanity: I know it's not total garbage :) But since the whole report is voluntary, it could all be garbage, so probably moot.

On Wed, Nov 30, 2016 at 9:03 PM, Brandon Philips notifications@github.com wrote:

@philips commented on this pull request.

In pkg/collector/api.go https://github.com/kubernetes-incubator/spartakus/pull/13:

@@ -89,7 +88,6 @@ func (s *APIServer) storeRecordHandler() httprouter.Handle { writeError(w, http.StatusBadRequest, fmt.Errorf("failed to decode record: %v", err)) return }

  • rec.Timestamp = strconv.FormatInt(time.Now().Unix(), 10)

what do you mean by sanity?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kubernetes-incubator/spartakus/pull/13, or mute the thread https://github.com/notifications/unsubscribe-auth/AFVgVO3lGCGaJJBL1fJ2B7iWADjY3yvhks5rDlU6gaJpZM4K6HnB .