Skip to content

Name every content key the Langfuse JS wrapper must strip - #38

Merged
sam-bretz merged 1 commit into
mainfrom
langfuse-legacy-content-keys
Nov 30, 2026
Merged

sam-bretz merged 1 commit into
mainfrom
langfuse-legacy-content-keys

Conversation

@sam-bretz

Copy link
Copy Markdown
Contributor

What

The Langfuse route in metergraph-onboarding tells an agent which span attributes to drop before a JavaScript dual export when prompts and responses must not leave the application. It summarized them as "gen_ai.* messages". That leaves out the legacy bare gen_ai.prompt and gen_ai.completion keys, which MeterGraph's OTLP endpoint reads as prompt and response text. A filter written from that wording would still send them.

This lists the exact keys:

  • langfuse.trace.input / .output and langfuse.observation.input / .output
  • gen_ai.input.messages, gen_ai.output.messages, gen_ai.system_instructions
  • legacy gen_ai.prompt and gen_ai.completion, bare and indexed (gen_ai.prompt.0.content)

It also says to keep gen_ai.prompt.name and .version, which name the prompt and hold no text. plugin/ is regenerated.

Testing

  • node scripts/validate.mjs: 12 skills valid.
  • python3 scripts/check_publication.py origin/main: no internal references.
  • python3 scripts/build_plugin.py: plugin regenerated.
  • The key list matches the exporter wrapper in the OTLP guide. That wrapper was checked against a local capture endpoint with Langfuse JS 6 and a span carrying bare and indexed legacy keys: none of the content values were sent, the prompt name was, and the call rows still landed.

🤖 Generated with Claude Code

The Langfuse route listed the content to drop before a JS dual export as
"`gen_ai.*` messages", which leaves out the legacy bare `gen_ai.prompt` and
`gen_ai.completion` keys. MeterGraph's OTLP endpoint reads those as prompt and
response text, so a filter written from that wording would still send them.
List the exact keys, bare and indexed, and keep `gen_ai.prompt.name` and
`.version`, which name the prompt and hold no text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-30T20:53:47.415381Z 37747fd PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sam-bretz
sam-bretz merged commit 77ddf0a into main Nov 30, 2026
7 checks passed
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.

1 participant