RecordTelemetry records how many attachment flags were provided.
(command string, recorder ghtelemetry.CommandRecorder)
| 42 | |
| 43 | // RecordTelemetry records how many attachment flags were provided. |
| 44 | func (f *Flag) RecordTelemetry(command string, recorder ghtelemetry.CommandRecorder) { |
| 45 | if recorder == nil || !f.Changed() { |
| 46 | return |
| 47 | } |
| 48 | |
| 49 | recorder.SetSampleRate(ghtelemetry.SAMPLE_ALL) |
| 50 | recorder.Record(ghtelemetry.Event{ |
| 51 | Type: "attachment_invocation", |
| 52 | Dimensions: ghtelemetry.Dimensions{ |
| 53 | "command": command, |
| 54 | }, |
| 55 | Measures: ghtelemetry.Measures{ |
| 56 | "attach_count": int64(len(f.values)), |
| 57 | }, |
| 58 | }) |
| 59 | } |
| 60 | |
| 61 | // UserAssets validates the files named by the attachment flag, keeping them in |
| 62 | // the order they were written. It returns nothing when the flag was not passed. |