Skip to content

feat(plugins): bundle langfuse_tracing as a first-class bundled plugin#16841

Closed
kshitijk4poor wants to merge 1 commit into
mainfrom
feat/langfuse-plugin
Closed

feat(plugins): bundle langfuse_tracing as a first-class bundled plugin#16841
kshitijk4poor wants to merge 1 commit into
mainfrom
feat/langfuse-plugin

Conversation

@kshitijk4poor

Copy link
Copy Markdown
Collaborator

Summary

Resolves the architecture concern from PR #15764: Langfuse tracing was implemented as an optional-skill that installed an external plugin from a personal fork. This PR replaces that with a proper bundled plugin.

What changed

File Change
plugins/langfuse_tracing/__init__.py Full tracing implementation — pre/post LLM + tool hooks
plugins/langfuse_tracing/plugin.yaml Plugin manifest
hermes_cli/config.py Langfuse env vars in OPTIONAL_ENV_VARS + _EXTRA_ENV_KEYS
hermes_cli/tools_config.py Langfuse Observability category in TOOL_CATEGORIES (Cloud + Self-Hosted); post_setup handler installs SDK + activates plugin
optional-skills/observability/langfuse-tracing/SKILL.md Slimmed to a pointer/troubleshooting doc

What was removed / fixed vs #15764

  • No personal fork dependency. Plugin code lives in the repo; no git fetch from kshitijk4poor/hermes-langfuse-tracing.
  • No git-fetch-into-repo-root. Eliminated the git fetch <external> <branch>:refs/remotes/... side-effect on the agent repo's .git/.
  • No installer skill. The optional skill is now a slim pointer doc, not a Python installer that users had to manually run.
  • CC_ aliases removed.* Continue.dev env var aliases (CC_LANGFUSE_*) stripped; only HERMES_LANGFUSE_* and standard LANGFUSE_* vars honoured.
  • hermes tools integration. Users enable via hermes tools → Langfuse Observability, which also installs the langfuse SDK.

User flow

hermes tools
# → Langfuse Observability → Cloud (or Self-Hosted)
# → enter public key, secret key, (optionally) base URL
# → restart Hermes
hermes plugins list   # langfuse_tracing appears

Tests

10 new tests in tests/plugins/test_langfuse_tracing.py:

  • fail-open when langfuse SDK not installed
  • env-gating (disabled by default, enabled with correct vars)
  • LANGFUSE_* standard vars as fallback
  • no CC_* aliases assertion
  • hook registration coverage
  • pre/post tool call span lifecycle
  • _safe_value edge cases (truncation, bytes, None)

Closes #15764

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins comp/cli CLI entry point, hermes_cli/, setup wizard labels Apr 28, 2026
Moves Langfuse observability from an optional-skill installer pattern
to a proper bundled plugin under plugins/langfuse_tracing/.

Changes:
- plugins/langfuse_tracing/__init__.py — full tracing implementation
  (pre/post LLM call + pre/post tool call hooks). CC_* Continue.dev
  aliases removed; only HERMES_LANGFUSE_* and standard LANGFUSE_*
  env vars are honoured.
- plugins/langfuse_tracing/plugin.yaml — plugin manifest
- hermes_cli/config.py — HERMES_LANGFUSE_{ENABLED,PUBLIC_KEY,SECRET_KEY,
  BASE_URL} added to OPTIONAL_ENV_VARS; optional keys (ENV, RELEASE,
  SAMPLE_RATE, MAX_CHARS, DEBUG) + standard LANGFUSE_* vars added to
  _EXTRA_ENV_KEYS so save_env_value / load_env recognise them
- hermes_cli/tools_config.py — 'Langfuse Observability' entry in
  TOOL_CATEGORIES (Cloud + Self-Hosted providers); post_setup handler
  that pip-installs the langfuse SDK and activates the plugin via config
- optional-skills/observability/langfuse-tracing/SKILL.md — slimmed to a
  pointer/troubleshooting doc; installer script removed (no longer needed)
- tests/plugins/test_langfuse_tracing.py — 10 tests covering fail-open,
  env-gating, no CC_ aliases, hook registration, span lifecycle, and
  _safe_value edge cases

Users enable tracing via `hermes tools` → Langfuse Observability.
No external git-fetch or personal fork dependency.
@kshitijk4poor

Copy link
Copy Markdown
Collaborator Author

Superseded by a cleaner PR with all review fixes applied. See the replacement PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants