Cortex Framework 中的遥测
Google Cloud Cortex Framework 会在部署和同步过程中收集匿名使用情况统计信息。
数据收集目的
- 功能采用评估:监控框架模块和数据产品部署的频率,为开发优先级提供依据。
- 集成模式识别:跟踪连接的源系统变体(例如 SAP ECC 或 SAP S/4HANA)有助于验证兼容性并确定这些集成的维护优先级。
遥测功能默认处于启用状态。如需停用此功能,请参阅停用遥测。
已收集数据
该框架会收集配置标识符,例如数据集 ID、数据产品实例 ID 和代码库 ID。系统不会收集用户身份属性,例如姓名、电子邮件地址或 IP 地址。
- Google Cloud 项目编号:标识运行部署的项目,在 X-Goog-User-Project 标头中传输以汇总用量。
- 部署区域或位置:目标资源的部署区域,用于跟踪地理分布。
- 框架版本:正在使用的 Cortex Framework 代码库的版本(例如 7.1.0)。
- 组件名称:正在处理的高级架构组件(例如,平台、数据产品或基础)。
- 工具类型:执行的具体 CLI 命令或实用程序(例如,
uv run cortex-deploy、uv run cortex-build-and-deploy、uv run cortex-demo、uv run cortex-create-kc-data-products、uv run cortex-create-ca-agents和uv run cortex-register-gemini-agents中的deployer、knowledge-catalog、conversational-agent或gemini)。 - 目标变体:部署目标类型(例如
dataform或git)、注册的数据产品 ID、对话智能体 ID,或 Gemini 应用或智能体 ID。 - 启用的模块类型:配置中启用的以英文句点分隔的模块路径(例如
cortex.sap.foundations.sap)。 - Dataform 代码库 ID:目标 Dataform 代码库的用户配置名称。
- BigQuery 数据集 ID:用户配置的目标 BigQuery 数据集名称。
- 数据产品实例 ID:在 Knowledge Catalog 注册步骤中使用的用户提供的 ID,用于标识已注册的数据产品。
- 执行状态:部署或同步步骤的完成状态(例如
deployed、post-deploy-success、registered或updated)。
User-Agent 标头结构
遥测参数会使用专用的 HTTP 用户代理标头注入到 Google Cloud API 请求中,该标头使用以下模式动态设置格式:
gcp-cortex-eng/framework/<version>/<component>/<tool_type>/<variant>[/<optional_extension>]/<status>
例如,成功将 SAP ERP 基础部署到 Dataform 目标时:
gcp-cortex-eng/framework/7.1.0/platform/deployer/dataform/cortex.sap.foundations.sap/deployed
数据传输
Cortex Framework 使用零载荷元数据日志记录机制 (EventLogger),而不是将日志载荷传输到外部端点。
在执行部署、同步、代理创建、注册或演示命令期间,EventLogger 会使用 Cloud Resource Manager API (cloudresourcemanager.googleapis.com) 查找目标 Google Cloud 项目编号,并针对标准 BigQuery 或 Dataform REST 端点发出轻量级经过身份验证的 HTTP GET 请求(不含请求正文)。每个请求都包含自定义 User-Agent 标头和包含项目编号的 X-Goog-User-Project 标头,以便 Google Cloud API 流量日志记录可以汇总匿名采用统计信息。
使用 --dry-run 运行 uv run cortex-create-kc-data-products、uv run cortex-create-ca-agents 或 uv run cortex-register-gemini-agents 会完全抑制遥测。
停用遥测
Cortex Framework 遵循您的隐私设置,并支持永久性全局停用和每次调用 CLI 标志。
全局停用
您可以使用 uv run cortex-config 更新 ~/.cortex/cortex-framework-consent.properties 处的永久性用户偏好设置文件,从而全局管理遥测。当此文件记录您的停用偏好设置 (enable_telemetry=false) 时,系统会在所有后续运行中跳过 Telemetry API 调用。
- 永久停用(全局停用):
uv run cortex-config telemetry disable
- 永久选择启用(全局启用):
uv run cortex-config telemetry enable
- 查看当前状态:
uv run cortex-config telemetry status
针对单次执行停用
将 --disable-telemetry 传递给发出遥测数据的 CLI(cortex-deploy、cortex-build-and-deploy、cortex-demo、cortex-create-kc-data-products、cortex-create-ca-agents 或 cortex-register-gemini-agents)会仅针对该单次命令调用停用遥测,而不会修改 ~/.cortex/cortex-framework-consent.properties(如需在全局范围内永久停用,请运行 uv run cortex-config telemetry disable)。uv run cortex-build 和 uv run cortex-apply-security 也接受 --disable-telemetry 来抑制启动遥测同意通知,尽管它们不会发送遥测请求:
export CORTEX_CONFIG_FILE=config/config.yaml
# Cortex deploy
uv run cortex-deploy --config $CORTEX_CONFIG_FILE --disable-telemetry
# Cortex build-and-deploy
uv run cortex-build-and-deploy --config $CORTEX_CONFIG_FILE --disable-telemetry
# Cortex apply security
uv run cortex-apply-security --config $CORTEX_CONFIG_FILE --disable-telemetry
# Cortex demo
uv run cortex-demo --project-id PROJECT_ID --disable-telemetry
# Cortex create Knowledge Catalog data products
uv run cortex-create-kc-data-products \
--config $CORTEX_CONFIG_FILE \
--owner-email OWNER_EMAIL \
--disable-telemetry
# Cortex create conversational analytics agents
uv run cortex-create-ca-agents --config $CORTEX_CONFIG_FILE --disable-telemetry
# Cortex register Gemini agents
uv run cortex-register-gemini-agents --config $CORTEX_CONFIG_FILE --disable-telemetry
替换以下内容:
PROJECT_ID:用于部署演示数据集的目标 Google Cloud 项目 ID,例如:my-cortex-demo-project。OWNER_EMAIL:数据产品所有者的邮箱,例如:data-owner@example.com。
后续步骤
如需详细了解这些命令及其参数,请参阅以下 CLI 参考文档: