use of com.microsoft.azure.gradle.configuration.GradleRuntimeConfig in project azure-gradle-plugins by microsoft.
the class GradleFunctionContext method getTelemetryProperties.
public Map<String, String> getTelemetryProperties() {
final Map<String, String> result = new HashMap<>();
final GradleRuntimeConfig runtime = getRuntime();
final String javaVersion = runtime == null ? null : runtime.javaVersion();
final String os = runtime == null ? null : runtime.os();
final boolean isDockerFunction = runtime != null && StringUtils.isNotEmpty(runtime.image());
result.put(FUNCTION_JAVA_VERSION_KEY, StringUtils.isEmpty(javaVersion) ? "" : javaVersion);
result.put(FUNCTION_RUNTIME_KEY, StringUtils.isEmpty(os) ? "" : os);
result.put(FUNCTION_IS_DOCKER_KEY, String.valueOf(isDockerFunction));
result.put(FUNCTION_REGION_KEY, getRegion());
result.put(FUNCTION_PRICING_KEY, getPricingTier());
result.put(DISABLE_APP_INSIGHTS_KEY, String.valueOf(isDisableAppInsights()));
result.put(DEPLOY_TO_SLOT_KEY, String.valueOf(StringUtils.isEmpty(getDeploymentSlotName())));
return result;
}
Aggregations