For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/cdp/api-ref/tracing.md.
Lynx
  • English
  • Tracing

    This page documents the Tracing CDP domain supported by Lynx DevTool.

    Experimental reference

    This generated reference is still being completed.

    • CDP events are not included yet.
    • Some Lynx extensions are listed but do not yet have detailed documentation.
    • Method descriptions are not automatically verified against the implementation and may be incomplete or inaccurate.

    Verify behavior against the implementation and the linked upstream CDP reference before relying on it.

    Overview

    • Scope: global-and-instance
    • CDP domain: Tracing

    Standard Methods

    Lynx Extensions

    Tracing.getStartupTracingConfig

    Returns the stored startup tracing configuration string.

    • Origin: lynx-extension
    • Source: devtool/lynx_devtool/agent/domain_agent/inspector_tracing_agent.cc
    Parameters

    No parameters.

    Returns
    NameTypeDescription
    configstringStartup tracing configuration string read from the trace controller storage.
    Notes
    • Dispatches through LynxGlobalDevToolMediator on the global DevTool task runner.
    • Reads GlobalDevToolPlatformFacade::GetTraceController()->GetStartupTracingConfig().
    • The trace controller stores the configuration as an opaque string. Lynx does not parse or validate it in this CDP method.
    • Returns a CDP error with message Failed to get trace controller when no trace controller is available.
    • If the global mediator has no default task runner, the current handler does not send an explicit CDP response.
    Examples

    Read startup tracing config

    Request:

    {
      "id": 1,
      "method": "Tracing.getStartupTracingConfig"
    }

    Response:

    {
      "id": 1,
      "result": {
        "config": "{\"traceConfig\":{\"includedCategories\":[\"*\"]}}"
      }
    }

    Tracing.getStartupTracingFile

    Emits a Tracing.tracingComplete event for the stored startup tracing file.

    • Origin: lynx-extension
    • Source: devtool/lynx_devtool/agent/domain_agent/inspector_tracing_agent.cc
    Parameters

    No parameters.

    Returns

    No return fields.

    Events
    • Tracing.tracingComplete
    Notes
    • Dispatches through LynxGlobalDevToolMediator on the global DevTool task runner.
    • Reads GlobalDevToolPlatformFacade::GetTraceController()->GetStartupTracingFilePath().
    • When a startup tracing file path exists, the method first sends an empty OK response and then sends Tracing.tracingComplete.
    • Tracing.tracingComplete.params.stream is a FileStream handle encoded as a string. Read it with IO.read and close it with IO.close.
    • Tracing.tracingComplete.params.dataLossOccurred is true when the file cannot be opened as a stream.
    • Tracing.tracingComplete.params.isStartupTracing is true for this method.
    • Returns a CDP error with message Startup Tracing is running when no file is available because tracing is still active.
    • Returns a CDP error with message Failed to get startup tracing file when no file is available and tracing is not active.
    • Returns a CDP error with message Failed to get trace controller when no trace controller is available.
    Examples

    Request the startup tracing file

    Request:

    {
      "id": 1,
      "method": "Tracing.getStartupTracingFile"
    }

    Response:

    {
      "id": 1,
      "result": {}
    }

    Startup tracing complete event

    Response:

    {
      "method": "Tracing.tracingComplete",
      "params": {
        "dataLossOccurred": false,
        "stream": "1",
        "isStartupTracing": true
      }
    }

    Tracing.setStartupTracingConfig

    Stores an opaque startup tracing configuration string.

    • Origin: lynx-extension
    • Source: devtool/lynx_devtool/agent/domain_agent/inspector_tracing_agent.cc
    Parameters
    NameTypeRequiredDescription
    configstringYesStartup tracing configuration string to persist through the trace controller.
    Returns

    No return fields.

    Notes
    • Dispatches through LynxGlobalDevToolMediator on the global DevTool task runner.
    • Writes params.config to GlobalDevToolPlatformFacade::GetTraceController()->SetStartupTracingConfig().
    • The trace controller stores the configuration as an opaque string. Lynx does not parse or validate it in this CDP method.
    • Returns an empty OK response when params.config is present.
    • Returns a CDP error with message Set Startup Tracing config is null when params.config is missing.
    • Returns a CDP error with message Failed to get trace controller when no trace controller is available.
    • If the global mediator has no default task runner, the current handler does not send an explicit CDP response.
    Examples

    Store startup tracing config

    Request:

    {
      "id": 1,
      "method": "Tracing.setStartupTracingConfig",
      "params": {
        "config": "{\"traceConfig\":{\"includedCategories\":[\"*\"]}}"
      }
    }

    Response:

    {
      "id": 1,
      "result": {}
    }
    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.