AboutSupportDeveloper GuideVersion 45.148.100.60

Chromium content tracing APIs exposed under fin.System.ContentTracing.

Hierarchy

  • Base
    • SystemContentTracing

Accessors

  • get me(): Identity
  • Returns Identity

    me should only be accessed from the fin global (FinApi.me); access through entity classes is not guaranteed to behave sensibly in all calling contexts.

Methods

  • Gets the currently known tracing category groups.

    Returns Promise<string[]>

    const categories = await fin.System.ContentTracing.getCategories();
    const sorted = [...new Set(categories)].sort((a, b) => a.localeCompare(b));
    console.log(`Loaded ${sorted.length} tracing categories`);
  • Returns the current maximum trace buffer usage across processes.

    This method is not supported on macOS and rejects on that platform.

    Returns Promise<TraceBufferUsage>

    try {
    const usage = await fin.System.ContentTracing.getTraceBufferUsage();
    console.log(`Buffer usage: ${usage.percentage}% (${usage.value})`);
    } catch (error) {
    console.warn('Trace buffer usage is not available on this platform.', error);
    }
  • Starts content tracing across runtime processes.

    Only one content tracing session may be active across the runtime at a time. This method rejects if another identity already owns the active session.

    Returns Promise<void>

    await fin.System.ContentTracing.startRecording({
    recording_mode: 'record-as-much-as-possible',
    included_categories: [
    '*',
    'disabled-by-default-blink.invalidation',
    'disabled-by-default-cc.debug',
    'disabled-by-default-viz.surface_id_flow'
    ]
    });

    console.log('Content tracing started. Call stopRecording() when ready to collect the trace.');
    await fin.System.ContentTracing.startRecording({
    categoryFilter: 'electron,blink,cc',
    traceOptions: 'record-until-full,enable-sampling'
    });
  • Stops the active content tracing session and writes the trace to the runtime-managed cache folder.

    The calling identity must match the identity that started the active tracing session. This method rejects if tracing is not active or is owned by another identity.

    Returns Promise<string>

    const tracePath = await fin.System.ContentTracing.stopRecording();
    console.log('Trace written to:', tracePath);
    // Load the file in chrome://tracing or https://ui.perfetto.dev/