发布

  • [OPIK-5717] [DOCS] docs: document project_name resolution order and opik.project_context() (#6263)

    frostbyte_neo 发布于 2026-04-14 15:57:10 +00:00

    • [OPIK-5717] [DOCS] docs: document project_name resolution order and opik.project_context()
    • Add "Project Name Resolution" section to sdk_configuration.mdx with full
      4-step resolution order, opik.project_context() docs, and @track context
      propagation examples
    • Update log_traces.mdx "Logging to a specific project" section with
      project_context() usage, @track nested inheritance, and resolution tip
    • Fix inaccurate parameter description "defaults to environment variable"
    • Add project name resolution link to 36 native Opik SDK integration pages

    Implements OPIK-5717

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • revert: remove project name resolution links from integration pages

    Keep documentation changes focused on sdk_configuration.mdx and
    log_traces.mdx only — no duplication across integration pages.

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • refactor: move project name resolution docs to log_traces.mdx only

    Revert sdk_configuration.mdx changes — project name resolution is not
    a configuration concern. Add a dedicated "Project name resolution"
    section to log_traces.mdx with the full precedence order and
    opik.project_context() documentation.

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • fix(docs): be precise about what respects project context

    Specify that Opik() client, @track-decorated functions, and native
    integrations (track_openai, OpikTracer, etc.) all participate in
    project name resolution — not just "any SDK method".

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • refactor(docs): consolidate all new content under project name resolution section

    Move @track context propagation and opik.project_context() examples
    out of "Logging to a specific project" into the dedicated "Project
    name resolution" section as sub-sections.

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • fix(docs): accurately describe project name resolution per actual SDK behavior

    The previous version implied explicit project_name always wins. In
    reality, once a project context is active (from a parent @track or
    project_context), it overrides nested @track and integration
    project_name arguments. Only Opik() client methods with an explicit
    project_name argument can override the context.

    Restructured the section into "no context active" vs "context active"
    to match the actual code paths in helpers.py, span_creation_handler.py,
    and context_storage.py.

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com


    Co-authored-by: Claude Opus 4.6 (1M context) noreply@anthropic.com

    下载附件