SetGlobalTelemetryVersion sets the version for automatic telemetry initialization This should be called by the root package to provide the correct version
(version string)
| 58 | // SetGlobalTelemetryVersion sets the version for automatic telemetry initialization |
| 59 | // This should be called by the root package to provide the correct version |
| 60 | func SetGlobalTelemetryVersion(version string) { |
| 61 | globalMu.Lock() |
| 62 | defer globalMu.Unlock() |
| 63 | |
| 64 | // If telemetry is already initialized, update the version |
| 65 | if globalToolTelemetryClient != nil { |
| 66 | globalToolTelemetryClient.setVersion(version) |
| 67 | } |
| 68 | // Store the version for future automatic initialization |
| 69 | globalTelemetryVersion = version |
| 70 | } |
| 71 | |
| 72 | // SetGlobalTelemetryDebugMode sets the debug mode for automatic telemetry initialization |
| 73 | // This should be called by the root package to pass the --debug flag state |