Skip to content

Commit 241539b

Browse files
authored
Merge pull request #6359 from microsoft/fix-appservice-telemetry
Fix possible null value for app service pricing tier in telemetry
2 parents 25e441f + 276ffa9 commit 241539b

File tree

1 file changed

+1
-0
lines changed
  • Utils/azure-toolkit-ide-libs/azure-toolkit-ide-appservice-lib/src/main/java/com/microsoft/azure/toolkit/ide/appservice/model

1 file changed

+1
-0
lines changed

Utils/azure-toolkit-ide-libs/azure-toolkit-ide-appservice-lib/src/main/java/com/microsoft/azure/toolkit/ide/appservice/model/AppServiceConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public Map<String, String> getTelemetryProperties() {
5858
final Map<String, String> result = new HashMap<>();
5959
result.put("subscriptionId", Optional.ofNullable(subscription).map(Subscription::getId).orElse(StringUtils.EMPTY));
6060
result.put("region", Optional.ofNullable(region).map(Region::getName).orElse(StringUtils.EMPTY));
61+
final PricingTier pricingTier = Optional.ofNullable(getServicePlan()).map(AppServicePlanEntity::getPricingTier).orElse(getPricingTier());
6162
result.put("pricingTier", Optional.ofNullable(pricingTier).map(PricingTier::getSize).orElse(StringUtils.EMPTY));
6263
return result;
6364
}

0 commit comments

Comments
 (0)