Skip to content

feat: add OTEL_LOG_TOOL_DETAILS and sync hook with production#13

Merged
doneyli merged 1 commit intomainfrom
issue-12-otel-hook-sync
Apr 2, 2026
Merged

feat: add OTEL_LOG_TOOL_DETAILS and sync hook with production#13
doneyli merged 1 commit intomainfrom
issue-12-otel-hook-sync

Conversation

@doneyli
Copy link
Copy Markdown
Owner

@doneyli doneyli commented Apr 2, 2026

Summary

  • Add OTEL_LOG_TOOL_DETAILS=1 to all 3 settings examples — enables skill_name and tool parameter details on telemetry events, needed for skill invocation tracking
  • Sync langfuse_hook.py with production: sys.path fix (prevents local langfuse/ dirs from shadowing the SDK) and permission governance tracking (Permission Events spans with flag summaries)

Context

Investigation of skill invocation tracking in Langfuse revealed that without OTEL_LOG_TOOL_DETAILS=1, skill names aren't attached to telemetry events. The hook also had production-only improvements not reflected in the template.

Skill cross-turn linkage (zero-duration spans, no parent link between trigger and execution traces) is tracked as future work — it's an upstream Claude Code limitation (anthropics/claude-code#35319).

Fixes #12

Test plan

  • Verify settings examples parse as valid JSON
  • Run hook against a session with skill invocations and confirm skill_name appears in Langfuse traces
  • Verify permission events span appears when permission-events.jsonl has entries
  • Test sys.path fix by running hook from a directory containing a langfuse/ folder

🤖 Generated with Claude Code

- Add OTEL_LOG_TOOL_DETAILS=1 to all settings examples for skill name
  attribution on telemetry events
- Sync langfuse_hook.py with production: sys.path fix to prevent local
  directories shadowing the SDK import, and permission governance tracking
  that creates Permission Events spans with flag summaries

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@doneyli
Copy link
Copy Markdown
Owner Author

doneyli commented Apr 2, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

@doneyli
Copy link
Copy Markdown
Owner Author

doneyli commented Apr 2, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

@doneyli doneyli merged commit b80a5d3 into main Apr 2, 2026
1 check passed
@doneyli doneyli deleted the issue-12-otel-hook-sync branch April 2, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add OTEL_LOG_TOOL_DETAILS, sync hook improvements, and improve skill tracking

1 participant