更改日志
概览
应用程序 Insights 成份为 Bake 的插件. 当包含在食谱中时, 此插件将安装一个应用程序 Insights 资源实例 。 提供了一个区域参数,以便部署到特定区域。 arm.json ARM模板中的智能检测设置将关闭默认的电子邮件通知,但仍会启用智能检测提醒. 此外,《公约》的命名公约 故障异常 警报非常具体,如果修改,可能会产生重复警报。 最后,微软正在贬低智能检测设置,一旦发生,将视需要更新.
使用量
创建资源的路径
name: Deploys all Application Insights resources
#shortName will be a component of the resource group name. ie <env><shortName> --> prodappinsights
shortName: appinsights
version: 0.0.2
ingredients:
- "@azbake/ingredient-app-insights@~0"
resourceGroup: true
recipe:
appinsights-property:
properties:
type: "@azbake/ingredient-app-insights"
source: ""
parameters:
#App Insights resource name
appInsightsName: "[appinsights.get_resource_name('property')]"
appinsights-payroll:
properties:
type: "@azbake/ingredient-app-insights"
source: ""
parameters:
#App Insights resource name
appInsightsName: "[appinsights.get_resource_name('payroll')]"
引用资源指南
name: Deploys all Application Insights resources
#shortName will be a component of the resource group name. ie <env><shortName> --> prodappinsights
shortName: propertywebappcontainer
version: 0.0.2
ingredients:
- "@azbake/ingredient-webapp-container@~0"
- "@azbake/ingredient-app-insights@~0"
resourceGroup: true
recipe:
mypkg-web-site:
properties:
type: "@azbake/ingredient-webapp-container"
source: "[coreutils.get_app_svc_name('ngapp')]"
tokens:
BASE_URL: "[coreutils.variable('svc_base_url')]"
PROPERTY: "some value"
APPINSIGHTS_INSTRUMENTATIONKEY: "[appinsights.get_instrumentation_key('property','appinsights')]"
parameters:
container_image_name: "myregistry.azurecr.io/mypkg:latest"
container_registry_url: "[coreutils.variable('container_registry_url')]"
container_registry_user: "[coreutils.variable('container_registry_user')]"
container_registry_password: "[coreutils.variable('container_registry_password')]"
公用事业
工具课可以在烘焙内部使用. 参数和源值的 Yaml 文件 .
appinsights 类
| 函数 | 说明 |
|---|---|
| 获取资源 名称 () | 获得完整的 App Insights 资源名 . |
| 获取 仪器 key () | 获得 App Insights 仪器密钥. |
函数细节
获取资源 名称 ()
通过传递一个短名获得一个完整的 App Insights 资源名. 格式返回
<environment_name>ai<shortname>。例如, prodaipayroll。 。 。 .
...
parameters:
appInsightsName: "[appinsights.get_resource_name('payroll')]"
...
回返
字符串
获取 仪器 key ()
通过传递一个短名和资源组短名来获得 App Insights 仪器密钥.
当另一种成分需要参考在另一种配方中部署的 App Insights 资源时,这在配方内部是有用的. 在下面的例子中,仪器密钥是从一个名为"Aiproperty"的App Insights资源返回的,该资源属于一个名为"appinsights"的资源组.
...
tokens:
APPINSIGHTS_INSTRUMENTATIONKEY: "[appinsights.get_instrumentation_key('property','appinsights')]"
...
回返
字符串
□ 增编 此成分的 packet.json 文件包括依赖"@azure/ms-rest-js":"^1.8.1". 添加后, 事件枢纽和服务巴士命名空间将编译 。 这些成分参考版本为各自Azure Javascript SDK包的3.2 (@azure/arm-eventhub,@azure/arm-servicebus). 另一种办法是使用这两个包的第3.1版.