platform-tracing-configure

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Platform Tracing — Configure

平台追踪(Platform Tracing)——配置

Generate EventSettings metadata to enable or disable the Platform Tracing toggle, which controls whether TraceSpanEvent is published at a sample rate. This modifies a single field (
enablePlatformTracing
) within the existing EventSettings metadata type.
生成EventSettings元数据以启用或禁用平台追踪开关,该开关控制是否以采样率发布TraceSpanEvent。此操作会修改现有EventSettings元数据类型中的单个字段(
enablePlatformTracing
)。

Scope

范围

  • In scope: Generating
    Event.settings-meta.xml
    with the
    enablePlatformTracing
    field to enable or disable TraceSpanEvent publishing.
  • Out of scope: Agentforce agent tracing to Data Cloud (use
    platform-tracing-agentforce-configure
    ). Other EventSettings fields (
    enableDeleteMonitoringData
    ,
    enableLoginForensics
    , etc.) owned by other teams. Event Log Files. Change Data Capture.

  • 包含范围:生成带有
    enablePlatformTracing
    字段的
    Event.settings-meta.xml
    ,以启用或禁用TraceSpanEvent发布。
  • 排除范围:将Agentforce代理追踪配置到数据云(请使用
    platform-tracing-agentforce-configure
    技能)。其他由其他团队负责的EventSettings字段(如
    enableDeleteMonitoringData
    enableLoginForensics
    等)。事件日志文件。变更数据捕获。

Prerequisites

前提条件

Before generating, inform the user of these requirements:
  1. PlatformTracing
    org permission
    must be active — this permission gates the feature. It is provisioned (not settable via metadata). Without it, the setting deploys but TraceSpanEvent is not published.
  2. API version 68.0+
    enablePlatformTracing
    on EventSettings was introduced in Spring '25. Orgs or tooling on older API versions will not recognize the field. Update
    sfdx-project.json
    sourceApiVersion
    to
    68.0
    or higher if on an older tooling version.
If the user reports the setting isn't working after deploy, the most likely cause is a missing prerequisite above.

在生成元数据之前,请告知用户以下要求:
  1. 必须激活
    PlatformTracing
    组织权限
    ——此权限是该功能的准入条件。它是预配置的(无法通过元数据设置)。如果没有此权限,设置可以部署,但不会发布TraceSpanEvent。
  2. API版本68.0及以上——EventSettings中的
    enablePlatformTracing
    字段是在Spring '25版本中引入的。使用旧版API的组织或工具将无法识别该字段。如果工具版本较旧,请将
    sfdx-project.json
    中的
    sourceApiVersion
    更新为
    68.0
    或更高版本。
如果用户反馈部署后设置未生效,最可能的原因是缺少上述前提条件之一。

Clarifying Questions

澄清问题

Before generating, confirm with the user if not already clear:
  • Enable or disable? (Which state do you want for Platform Tracing / TraceSpanEvent?)
No other clarification needed — this controls a single boolean field.

在生成之前,如果信息不明确,请与用户确认:
  • 是启用还是禁用?(您希望平台追踪/TraceSpanEvent处于哪种状态?)
无需其他澄清——此操作仅控制一个布尔字段。

Required Inputs

必填输入

Gather or infer before proceeding:
  • Desired state:
    true
    (enable) or
    false
    (disable)
Defaults unless specified:
  • If user says "enable" or "turn on": set to
    true
  • If user says "disable" or "turn off": set to
    false
If the user provides a clear request, generate immediately without unnecessary back-and-forth.

在继续之前,请收集或推断以下信息:
  • 期望状态
    true
    (启用)或
    false
    (禁用)
默认规则(除非另有指定):
  • 如果用户说“启用”或“开启”:设置为
    true
  • 如果用户说“禁用”或“关闭”:设置为
    false
如果用户提供了明确的请求,请立即生成,无需不必要的来回沟通。

Workflow

工作流程

  1. Warn about prerequisites — inform the user that this feature requires the
    PlatformTracing
    org permission and API version 68.0+.
  2. Read the template — load
    assets/EventSettings-template.xml
    .
  3. Generate the settings file — replace
    {ENABLED}
    with
    true
    or
    false
    based on the user's desired state.
  4. Place the file — output to
    settings/Event.settings-meta.xml
    in the project's source directory.

  1. 提醒前提条件——告知用户此功能需要
    PlatformTracing
    组织权限和API版本68.0及以上。
  2. 读取模板——加载
    assets/EventSettings-template.xml
  3. 生成设置文件——根据用户期望的状态,将
    {ENABLED}
    替换为
    true
    false
  4. 放置文件——将输出文件放在项目源目录的
    settings/Event.settings-meta.xml
    路径下。

Rules / Constraints

规则/约束

ConstraintRationale
Only include
enablePlatformTracing
in generated metadata
Other fields in EventSettings are owned by other teams. Including them risks overwriting unrelated settings during deploy.
XML namespace must be
http://soap.sforce.com/2006/04/metadata
Any other namespace causes deploy failure.
File must be named
Event.settings-meta.xml
SFDX source format convention — the type name prefix for EventSettings is
Event
.
Requires
PlatformTracing
org permission
Without this permission, the setting deploys but has no effect on TraceSpanEvent publishing.
Requires API v68.0+Older orgs/tooling reject the field entirely.

约束理由
生成的元数据中仅包含
enablePlatformTracing
EventSettings中的其他字段由其他团队负责。在部署时包含这些字段可能会覆盖无关设置。
XML命名空间必须为
http://soap.sforce.com/2006/04/metadata
使用任何其他命名空间都会导致部署失败。
文件必须命名为
Event.settings-meta.xml
SFDX源格式约定——EventSettings的类型名称前缀为
Event
需要
PlatformTracing
组织权限
没有此权限,设置可以部署,但对TraceSpanEvent的发布没有影响。
需要API版本68.0及以上旧版组织/工具会完全拒绝该字段。

Gotchas

常见问题

IssueResolution
Deploy succeeds but TraceSpanEvent not publishedOrg lacks the
PlatformTracing
permission. This is provisioned, not settable via metadata.
enablePlatformTracing
field not recognized by org/tooling
Tooling is on API version < 68.0. Update
sfdx-project.json
sourceApiVersion
to
68.0
or higher.
User confuses this with Agentforce tracingClarify: this publishes TraceSpanEvent for platform operations. For Agentforce agent spans to Data Cloud, use the
platform-tracing-agentforce-configure
skill.
User wants to configure all Event Monitoring settingsOnly
enablePlatformTracing
is in scope. Other EventSettings fields are owned by other teams and not managed by this skill.

问题解决方案
部署成功但未发布TraceSpanEvent组织缺少
PlatformTracing
权限。此权限是预配置的,无法通过元数据设置。
组织/工具无法识别
enablePlatformTracing
字段
工具使用的API版本低于68.0。请将
sfdx-project.json
中的
sourceApiVersion
更新为
68.0
或更高版本。
用户将此与Agentforce追踪混淆澄清:此功能用于发布平台操作的TraceSpanEvent。若要将Agentforce代理跨度配置到数据云,请使用
platform-tracing-agentforce-configure
技能。
用户希望配置所有事件监控设置
enablePlatformTracing
在本技能的处理范围内。其他EventSettings字段由其他团队负责,不在本技能的管理范围内。

Output Expectations

输出预期

Deliverables:
  • settings/Event.settings-meta.xml
Before delivering, verify:
  • XML namespace is exactly
    http://soap.sforce.com/2006/04/metadata
  • File is named
    Event.settings-meta.xml
  • Only
    enablePlatformTracing
    is present (no other EventSettings fields)
  • Project
    sourceApiVersion
    in
    sfdx-project.json
    is
    68.0
    or higher

交付物:
  • settings/Event.settings-meta.xml
交付前请验证:
  • XML命名空间完全为
    http://soap.sforce.com/2006/04/metadata
  • 文件命名为
    Event.settings-meta.xml
  • 仅包含
    enablePlatformTracing
    (无其他EventSettings字段)
  • 项目
    sfdx-project.json
    中的
    sourceApiVersion
    68.0
    或更高版本

Cross-Skill Integration

跨技能集成

NeedDelegate to
Enable Agentforce agent tracing to Data Cloud
platform-tracing-agentforce-configure
skill
Set up Change Data Capture
integration-eventing-cdc-configure
skill
Configure ManagedEventSubscription
integration-eventing-subscription-configure
skill

需求委托给
启用Agentforce代理追踪到数据云
platform-tracing-agentforce-configure
技能
设置变更数据捕获
integration-eventing-cdc-configure
技能
配置ManagedEventSubscription
integration-eventing-subscription-configure
技能

Reference File Index

参考文件索引

FileWhen to read
assets/EventSettings-template.xml
Step 2 — template for generating the settings file
文件读取时机
assets/EventSettings-template.xml
步骤2——用于生成设置文件的模板