platform-tracing-configure
Generate EventSettings metadata to enable or disable Platform Tracing (TraceSpanEvent publishing) in Event Monitoring. Use this skill for any EventSettings enablePlatformTracing metadata work. TRIGGER when: user mentions Platform Tracing, TraceSpanEvent, enable tracing in Event Monitoring Settings, event monitoring tracing toggle, enablePlatformTracing, .settings-meta.xml for Event settings tracing, turn on trace span events, or stop publishing trace spans. DO NOT TRIGGER when: user wants Agentforce agent tracing to Data Cloud (use platform-tracing-agentforce-configure), wants Event Log Files or ELF generation, wants Change Data Capture (use integration-eventing-cdc-configure), or wants ManagedEventSubscription (use integration-eventing-subscription-configure).
Resumen
Platform Tracing — Configure
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.
Scope
- In scope: Generating
Event.settings-meta.xmlwith theenablePlatformTracingfield 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.
Prerequisites
Before generating, inform the user of these requirements:
PlatformTracingorg 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.- API version 68.0+ —
enablePlatformTracingon EventSettings was introduced in Spring '25. Orgs or tooling on older API versions will not recognize the field. Updatesfdx-project.jsonsourceApiVersionto68.0or 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.
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.
Required Inputs
Gather or infer before proceeding:
- Desired state:
true(enable) orfalse(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.
Workflow
- Warn about prerequisites — inform the user that this feature requires the
PlatformTracingorg permission and API version 68.0+. - Read the template — load
assets/EventSettings-template.xml. - Generate the settings file — replace
{ENABLED}withtrueorfalsebased on the user's desired state. - Place the file — output to
settings/Event.settings-meta.xmlin the project's source directory.
Rules / Constraints
| Constraint | Rationale |
|---|---|
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. |
Gotchas
| Issue | Resolution |
|---|---|
| Deploy succeeds but TraceSpanEvent not published | Org 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 tracing | Clarify: 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 settings | Only enablePlatformTracing is in scope. Other EventSettings fields are owned by other teams and not managed by this skill. |
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
enablePlatformTracingis present (no other EventSettings fields) - [ ] Project
sourceApiVersioninsfdx-project.jsonis68.0or higher
Cross-Skill Integration
| Need | Delegate 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 |
Reference File Index
| File | When to read |
|---|---|
assets/EventSettings-template.xml | Step 2 — template for generating the settings file |
Archivos 2 archivos
Instálala a mano
Deska ejecuta esto por ti, para cada agente que elijas. Para ejecutarlo tú en una terminal:
npx skills add forcedotcom/sf-skills --skill platform-tracing-configureMás de forcedotcom
- platform-apex-generateforcedotcomPrimary Apex authoring skill for class generation, refactoring, and review. ALWAYS ACTIVATE when the user mentions Apex, .cls, triggers, or asks to create/refactor a class (service, selector, domain, batch, queueable, schedulable, invocable, DTO, utility, interface, abstract, exception, REST resource). Use this skill for requests involving SObject CRUD, mapping collections, fetching related records, scheduled jobs, batch jobs, trigger design, @AuraEnabled controllers, @RestResource endpoints, custom REST APIs, or code review of existing Apex.6,700 instalaciones en skills.sh0
- platform-apex-test-generateforcedotcomUse to generate and validate Apex test classes with TestDataFactory patterns, bulk testing (251+ records), mocking, assertions, and disciplined test-fix loops. Use when creating Apex test classes (for triggers, services, controllers, batch jobs, queueables, and callouts), improving coverage, debugging or fixing failing Apex tests, or running test/coverage analysis. Triggers on *Test.cls files, sf apex run test, coverage reports. Do NOT trigger for production Apex (use platform-apex-generate) or Jest/LWC tests.6,600 instalaciones en skills.sh0
- platform-apex-test-runforcedotcomApex test execution, coverage analysis, and test-fix loops with 120-point scoring. Use when the user runs Apex tests, checks code coverage, fixes failing tests, or touches *Test.cls / *_Test.cls files. DO NOT TRIGGER when writing Apex production code (use platform-apex-generate), Agentforce agent testing (use agentforce-test), or Jest/LWC tests (use experience-lwc-generate).6,500 instalaciones en skills.sh0
- platform-apex-logs-debugforcedotcomSalesforce debug log analysis and troubleshooting with 100-point scoring. TRIGGER when: user analyzes debug logs, hits governor limits, reads stack traces, or touches .log files from Salesforce orgs. DO NOT TRIGGER when: running Apex tests (use platform-apex-test-run), generating or fixing Apex code (use platform-apex-generate), or Agentforce session tracing (use agentforce-observe).6,400 instalaciones en skills.sh0
- platform-metadata-deployforcedotcomSalesforce DevOps automation using sf CLI v2. TRIGGER when: user deploys metadata, creates/manages scratch orgs or sandboxes, sets up CI/CD pipelines, or troubleshoots deployment errors with sf project deploy. DO NOT TRIGGER when: writing Apex code (use platform-apex-generate), building LWC components (use experience-lwc-generate), creating metadata definitions (use platform-custom-object-generate or platform-custom-field-generate), or querying org data (use platform-data-manage).6,300 instalaciones en skills.sh0