Search in sources :

Example 1 with KeenProject

use of io.keen.client.java.KeenProject in project blueocean-plugin by jenkinsci.

the class KeenAnalyticsImpl method doTrack.

@Override
protected void doTrack(String name, Map<String, Object> allProps) {
    // Always set the proxy in case its configuration has changed after startup
    ProxyConfiguration proxyConfig = Jenkins.get().proxy;
    Proxy proxy = proxyConfig == null ? null : proxyConfig.createProxy(null);
    CLIENT.setProxy(proxy);
    // Ensure that we are using the right project info
    KeenProject project = KeenConfiguration.get().project();
    CLIENT.setDefaultProject(project);
    // Send the event
    CLIENT.addEventAsync(name, allProps);
}
Also used : Proxy(java.net.Proxy) ProxyConfiguration(hudson.ProxyConfiguration) KeenProject(io.keen.client.java.KeenProject)

Aggregations

ProxyConfiguration (hudson.ProxyConfiguration)1 KeenProject (io.keen.client.java.KeenProject)1 Proxy (java.net.Proxy)1