fix(observability/langfuse): surface placeholder & runtime ingestion failures (#60961) - #60974
Closed
imax500tr wants to merge 1 commit into
Closed
fix(observability/langfuse): surface placeholder & runtime ingestion failures (#60961)#60974imax500tr wants to merge 1 commit into
imax500tr wants to merge 1 commit into
Conversation
…failures (NousResearch#60961) - Extend _validate_langfuse_key to catch placeholder fragments even when the key carries the correct pk-lf-/sk-lf- prefix (e.g. sk-lf-..., sk-lf-***, pk-lf-placeholder). Substring fragments stay conservative so real keys like sk-lf-...-abc are not flagged; whole-value templates (sk-lf-..., ***) are matched by exact equality. - Wire Langfuse's on_unexpected_error callback so the first runtime ingestion failure (bad creds / missing project) is logged as an ERROR naming the cause, instead of being swallowed silently. The warning fires once per process to avoid log floods. Fixes NousResearch#60961
Collaborator
Related: fixes #60961. This extends the merged placeholder guard (#26320) which only checks the |
This was referenced Jul 14, 2026
This was referenced Aug 3, 2026
This was referenced Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #60961 — the Langfuse observability plugin silently accepted placeholder/template credentials and swallowed runtime ingestion failures, so operators got zero traces with no signal in the logs.
_validate_langfuse_key): previously only thepk-lf-/sk-lf-prefix was checked. Now a key that carries the right prefix but still contains a known placeholder fragment (e.g.sk-lf-...,sk-lf-***,pk-lf-placeholder,sk-lf-unset) is rejected with a clear one-shot warning naming the offending env var. Substring fragments stay conservative (real keys likesk-lf-...-abcare not flagged); whole-value templates (sk-lf-...,***) are matched by exact equality.on_unexpected_errorcallback is now wired so the first ingestion failure (bad credentials / missing project) is logged as anERRORnaming the likely cause, instead of being swallowed. The warning fires once per process to avoid log floods. Older SDK versions that don't accept the callback fall back gracefully.Test plan
TestIssue60961PlaceholderFragments(parametrized overpk-lf-...,sk-lf-...,sk-lf-***,pk-lf-placeholder,sk-lf-unset,pk-lf-example-key, …) asserting the guard rejects them.TestRuntimeIngestionErrorassertingon_unexpected_errorlogs the first failure and fires only once.tests/plugins/suite (1752 tests) green.🤖 Generated with Hermes