遥测上下文:Application Insights 数据模型Telemetry context: Application Insights data model

每个遥测项可能都有一个强类型化上下文字段。Every telemetry item may have a strongly typed context fields. 每个字段均会启用特定监视方案。Every field enables a specific monitoring scenario. 使用自定义属性集合存储自定义或特定于应用程序的上下文信息。Use the custom properties collection to store custom or application-specific contextual information.

应用程序版本Application version

应用程序上下文字段中的信息总是与发送遥测的应用程序有关。Information in the application context fields is always about the application that is sending the telemetry. 应用程序版本用于分析应用程序行为的趋势变化及其与部署的关联。Application version is used to analyze trend changes in the application behavior and its correlation to the deployments.

最大长度:1024Max length: 1024

客户端 IP 地址Client IP address

客户端设备的 IP 地址。The IP address of the client device. 支持 IPV4 和 IPV6。IPv4 and IPv6 are supported. 从服务发送遥测时,位置上下文与在服务中启用操作的用户有关。When telemetry is sent from a service, the location context is about the user that initiated the operation in the service. Application Insights 从客户端 IP 中提取地理位置信息,然后将其截断。Application Insights extract the geo-location information from the client IP and then truncate it. 因此,无法将客户端 IP 本身用作最终用户的可识别信息。So client IP by itself cannot be used as end-user identifiable information.

最大长度:46Max length: 46

设备类型Device type

最初,该字段用于指示应用程序的最终用户使用的设备类型。Originally this field was used to indicate the type of the device the end user of the application is using. 现在该字段主要用于区分设备类型为“浏览器”的 JavaScript 遥测与设备类型为“电脑”的服务器端遥测。Today used primarily to distinguish JavaScript telemetry with the device type 'Browser' from server-side telemetry with the device type 'PC'.

最大长度:64Max length: 64

操作 IDOperation id

根操作的唯一标识符。A unique identifier of the root operation. 此标识符允许跨多个组件对遥测分组。This identifier allows to group telemetry across multiple components. 请参阅遥测关联,了解详细信息。See telemetry correlation for details. 操作 ID 由请求或页面视图创建。The operation id is created by either a request or a page view. 其他所有遥测将此字段设置为包含请求或页面视图的值。All other telemetry sets this field to the value for the containing request or page view.

最大长度:128Max length: 128

父操作 IDParent operation ID

遥测项的直接父操作的唯一标识符。The unique identifier of the telemetry item's immediate parent. 请参阅遥测关联,了解详细信息。See telemetry correlation for details.

最大长度:128Max length: 128

操作名称Operation name

操作的名称(组)。The name (group) of the operation. 操作名称由请求或页面视图创建。The operation name is created by either a request or a page view. 其他所有遥测项将此字段设置为包含请求或页面视图的值。All other telemetry items set this field to the value for the containing request or page view. 操作名称用于查找一组操作的所有遥测项(例如“GET Home/Index”)。Operation name is used for finding all the telemetry items for a group of operations (for example 'GET Home/Index'). 此上下文属性用于回答“此页面的典型异常有哪些?”等问题。This context property is used to answer questions like "what are the typical exceptions thrown on this page."

最大长度:1024Max length: 1024

操作的综合源Synthetic source of the operation

综合源名称。Name of synthetic source. 来自应用程序的一些遥测可能代表综合流量。Some telemetry from the application may represent synthetic traffic. 可能是索引网站的 Web 爬网程序、站点可用性测试或诊断库(如 Application Insights SDK 本身)的跟踪。It may be web crawler indexing the web site, site availability tests, or traces from diagnostic libraries like Application Insights SDK itself.

最大长度:1024Max length: 1024

会话 IDSession id

会话 ID - 用户与应用交互的实例。Session ID - the instance of the user's interaction with the app. 会话上下文字段中的信息总是与最终用户有关。Information in the session context fields is always about the end user. 从服务发送遥测时,会话上下文与在服务中启用操作的用户有关。When telemetry is sent from a service, the session context is about the user that initiated the operation in the service.

最大长度:64Max length: 64

匿名用户 IDAnonymous user id

匿名用户 ID。表示应用程序的最终用户。Anonymous user id. Represents the end user of the application. 从服务发送遥测时,用户上下文与在服务中启用操作的用户有关。When telemetry is sent from a service, the user context is about the user that initiated the operation in the service.

采样是最小化遥测收集量的一种技术。Sampling is one of the techniques to minimize the amount of collected telemetry. 采样算法尝试在所有相关遥测内部或外部采样。Sampling algorithm attempts to either sample in or out all the correlated telemetry. 匿名用户 ID 用于生成采样得分。Anonymous user id is used for sampling score generation. 所以匿名用户 ID 应为随机值。So anonymous user id should be a random enough value.

使用匿名用户 ID 存储用户名是字段误用。Using anonymous user id to store user name is a misuse of the field. 使用已经过身份验证的用户 ID。Use Authenticated user id.

最大长度:128Max length: 128

已经过身份验证的用户 IDAuthenticated user id

已经过身份验证的用户 ID。与匿名用户 ID 相反,此字段表示具有友好名称的用户。Authenticated user id. The opposite of anonymous user id, this field represents the user with a friendly name. 由于其 PII 信息,默认情况下,大多数 SDK 不收集它。Since its PII information it is not collected by default by most SDK.

最大长度:1024Max length: 1024

帐户 IDAccount id

在多租户应用程序中,这是用户使用的帐户 ID 或名称。In multi-tenant applications this is the account ID or name, which the user is acting with. 例如,Azure 门户的订阅 ID 或博客平台的博客名称。Examples may be subscription ID for Azure portal or blog name blogging platform.

最大长度:1024Max length: 1024

云角色Cloud role

应用程序的角色名称。Name of the role the application is a part of. 直接映射到 Azure 中的角色名称。Maps directly to the role name in azure. 也可用于区分单个应用程序包含的微服务。Can also be used to distinguish micro services, which are part of a single application.

最大长度:256Max length: 256

云角色实例Cloud role instance

正在运行应用程序的实例的名称。Name of the instance where the application is running. 本地计算机名称,Azure 实例名称。Computer name for on-premises, instance name for Azure.

最大长度:256Max length: 256

内部:SDK 版本Internal: SDK version

SDK 版本。SDK version. 请参阅 https://github.com/Microsoft/ApplicationInsights-Home/blob/master/SDK-AUTHORING.md#sdk-version-specification 获取相关信息。See https://github.com/Microsoft/ApplicationInsights-Home/blob/master/SDK-AUTHORING.md#sdk-version-specification for information.

最大长度:64Max length: 64

内部:节点名称Internal: Node name

此字段表示用于计费的节点名称。This field represents the node name used for billing purposes. 使用该字段替代节点的标准检测。Use it to override the standard detection of nodes.

最大长度:256Max length: 256

后续步骤Next steps