Search in sources :

Example 6 with AzureTelemetryClient

use of com.microsoft.azure.toolkit.lib.common.telemetry.AzureTelemetryClient in project azure-gradle-plugins by microsoft.

the class TelemetryAgent method initTelemetry.

public void initTelemetry(@Nonnull String pluginName, @Nonnull String pluginVersion, boolean allowTelemetry) {
    this.pluginName = pluginName;
    this.pluginVersion = pluginVersion;
    this.allowTelemetry = allowTelemetry;
    telemetryProxy = new AzureTelemetryClient(this.getTelemetryProperties());
    if (!allowTelemetry) {
        telemetryProxy.trackEvent(TELEMETRY_NOT_ALLOWED);
        telemetryProxy.disable();
    } else {
        AzureTelemeter.setClient(telemetryProxy);
        AzureTelemeter.setCommonProperties(this.getTelemetryProperties());
        AzureTelemeter.setEventNamePrefix("AzurePlugin.Gradle");
    }
}
Also used : AzureTelemetryClient(com.microsoft.azure.toolkit.lib.common.telemetry.AzureTelemetryClient)

Aggregations

AzureTelemetryClient (com.microsoft.azure.toolkit.lib.common.telemetry.AzureTelemetryClient)6