Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Claude Codeログ基盤の構築

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

Claude Codeログ基盤の構築

Claude Code Meetup Japan #3 (Claude Code祭り!) - connpass
https://aid.connpass.com/event/384117/

Avatar for giginet

giginet PRO

March 12, 2026
Tweet

More Decks by giginet

Other Decks in Programming

Transcript

  1. Claude Codeͷϩά 1. Open TelemetryΛ࢖ͬͨϞχλϦϯά • https://code.claude.com/docs/en/monitoring-usage • ࢖༻ྔ͔͠Θ͔Βͳ͍ 2.

    νʔϜμογϡϘʔυ • https://code.claude.com/docs/en/analytics • มߋߦ਺͔͠Θ͔Βͳ͍ɺݖݶ؅ཧͷ໰୊ 3. Claude Code HooksΛ࢖ͬͨϩάૹ৴
  2. Claude Codeͷϩά 1. Open TelemetryΛ࢖ͬͨϞχλϦϯά • https://code.claude.com/docs/en/monitoring-usage • ࢖༻ྔ͔͠Θ͔Βͳ͍ 2.

    νʔϜμογϡϘʔυ • https://code.claude.com/docs/en/analytics • มߋߦ਺͔͠Θ͔Βͳ͍ɺݖݶ؅ཧͷ໰୊ 3. Claude Code HooksΛ࢖ͬͨϩάૹ৴
  3. HookΛ࢖ͬͨϩάج൫ͷߏங • Claude Code HooksΛ࢖ͬͯΠϕϯτ͕͋ͬͨͱ͖ʹϩάΛૹ৴ • Open Telemetry΍૊ΈࠐΈͷμογϡϘʔυʹൺ΂ɺ۩ମతͳར༻ঢ়گΛऔΓ ΍͍͢ •

    ޷͖ͳٕज़ελοΫͰ࡞ΕΔ • ྫɿϩΨʔ͸Python(ґଘແ͠)ɺϩάόοΫΤϯυ͸Kotlinɺࣾ಺BIπʔϧͰ μογϡϘʔυԽ
  4. Hook Lifecycle • ެࣜυΩϡϝϯτʹhook͕·ͱ·͍ͬͯΔ • https://code.claude.com/docs/en/hooks • SessionStart, PostToolUse, UserPromptSubmit,

    SubagentStartลΓͷhookΛ࢖͍ͬͯΔ • ஌Βͳ͍͏ͪʹ૿͑ΔͷͰখ·ΊʹݟΔͷ͕ྑ͍ • ࠷ۙ(2.1.69)ɺInstructionsLoadedͱ͔΋૿͑ͨ
  5. • tool_name: (Skill, MCP, WriteͳͲ) • πʔϧݻ༗ͷ৘ใ͸tool_input • Edit/Writeπʔϧͷ৔߹͸ॻ͖׵͑ͨί ϯςϯπͷத਎

    • Skill΍Custom Slash CommandɺMCP ͷར༻࣌͸໊લ΍Ҿ਺ ྫɿPostToolUse Hook { "session_id": "a9a5ec5e-2e4a-4081- affa-1a5db37e3dee", "transcript_path": “/path/to/pwd", "permission_mode": "acceptEdits", "hook_event_name": "PostToolUse", "tool_name": "Skill", "tool_input": { "skill": "translate-prompt", "args": "Hello World" }, "tool_response": { "success": true, "commandName": "translate-prompt" }, "tool_use_id": "toolu_01Q4XCQmACq3P84he64nPrBN", "skill_name": "translate-prompt" }
  6. PluginԽͯ͠഑෍͢Δ • Marketplace + PluginͰ഑෍ $ claude plugin marketplace add

    git@git-server/line-client-plugins.git $ claude plugin install logging@line-client
  7. ϓϥάΠϯͷσϑΥϧτ༗ޮԽ • ϩΨʔΛ༗ޮԽ͍ͨ͠ϓϩδΣΫτͷ enabledPlugins + extraKnownMarketplacesͰϓϥάΠϯ Λৗʹ༗ޮʹ͢Δ͜ͱ͕Ͱ͖Δ { "enabledPlugins": {

    "logging@line-client": true }, "extraKnownMarketplaces": { "line-client": { "source": { "source": "git", "url": “git@git-server/ line-client-plugins.git” } } } } .claude/settings.json
  8. ੜ࢈ੑͷܭଌ • ⚠ར༻ྔ = ੜ࢈ੑͰ͸ͳ͍ • ActivityΛऔΔ͜ͱ͸Ͱ͖Δ͕ɺͦΕ͚ͩͰੜ࢈ੑΛܭΔ͜ͱ͸೉͍͠ • ϓϩϯϓτΛ͍ͬͺ͍ൃߦͯ͠Δɾߦ਺Λͨ͘͞Μॻ͖׵͑ͯΔਓ͕Ғ͍Θ ͚Ͱ͸ͳ͍

    • Pull Requestͷঢ়گͳͲɺଞͷੜ࢈ੑࢦඪͱඥ෇͚ͯݟΔඞཁ͕͋Δ • ࣮ࡍʹPR਺ʹ͸ར༻ঢ়گͱͷ૬͕ؔݟΒΕͨ • ͜ͷลͷ࿩͸ۙʑϒϩάʹॻ͖͍ͨ