mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-07 09:06:03 +00:00
Merge pull request #3894 from daniel-beck/auto-refresh-telemetry
Add telemetry for 'auto refresh' feature
This commit is contained in:
5 files changed
+132
No files matched your search
@@ -27,6 +27,7 @@ package hudson;
|
||||
|
||||
import hudson.model.Slave;
|
||||
import hudson.security.*;
|
||||
import jenkins.telemetry.impl.AutoRefresh;
|
||||
import jenkins.util.SystemProperties;
|
||||
import hudson.cli.CLICommand;
|
||||
import hudson.console.ConsoleAnnotationDescriptor;
|
||||
@@ -178,6 +179,7 @@ import org.kohsuke.accmod.restrictions.DoNotUse;
|
||||
@SuppressWarnings("rawtypes")
|
||||
public class Functions {
|
||||
private static final AtomicLong iota = new AtomicLong();
|
||||
private static Logger LOGGER = Logger.getLogger(Functions.class.getName());
|
||||
|
||||
public Functions() {
|
||||
}
|
||||
@@ -646,6 +648,12 @@ public class Functions {
|
||||
if (refresh) {
|
||||
response.addHeader("Refresh", SystemProperties.getString("hudson.Functions.autoRefreshSeconds", "10"));
|
||||
}
|
||||
|
||||
try {
|
||||
ExtensionList.lookupSingleton(AutoRefresh.class).recordRequest(request, refresh);
|
||||
} catch (Exception e) {
|
||||
LOGGER.log(Level.WARNING, "Failed to record auto refresh status in telemetry", e);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isAutoRefresh(HttpServletRequest request) {
|
||||
|
||||
Reference in new issue
Block a user