Skip to content

feat: APIログ取込(SDKラッパー / OpenTelemetry collector) #4

Description

@mikana0918

概要

Anthropic API を直叩きしているアプリのログも cchist のアーカイブ対象にする。READMEロードマップ項目。

動機

Claude Code と claude.ai は取込済だが、SDK経由のAPIコールは履歴に残らず横断検索から漏れる。

設計案

  • SDKラッパー: @anthropic-ai/sdk を薄くラップして req/resp を jsonl に追記するライブラリを別途公開。アプリ側で1行 import 差替え。
  • OpenTelemetry collector: 既存OTel採用済プロジェクト向け。span attribute から prompt/completion 抽出。
  • 形式統一: Claude Code の jsonl 形式と互換性を持たせるか、別 source kind を新設するか議論。

やること

  • 取込形式の決定(Claude Code互換 vs 別kind)
  • PoC: SDK ラッパー方式
  • source.kind = "api-log" の仕様策定

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions