Skip to content

Observability instrumentation#110

Open
valdis wants to merge 2 commits intomainfrom
observability-instrumentation
Open

Observability instrumentation#110
valdis wants to merge 2 commits intomainfrom
observability-instrumentation

Conversation

@valdis
Copy link
Copy Markdown
Collaborator

@valdis valdis commented Apr 8, 2026

Langfuse observability for the review pipeline.

Traces per run with per-job, per-pass, and per-file-review generations (token usage, latency, cost)

Set both keys (no other configuration needed — QualOps auto-detects them):

LANGFUSE_SECRET_KEY=sk-lf-...
LANGFUSE_PUBLIC_KEY=pk-lf-...

# Optional — defaults to https://cloud.langfuse.com
LANGFUSE_BASE_URL=https://your-self-hosted-langfuse.example.com

Session grouping

Traces are grouped by sessionId. When running in CI, QualOps derives the session from PR metadata (GITHUB_REPOSITORY + head SHA, or CI_PROJECT_PATH + head SHA for GitLab). Outside CI, the session falls back to the local run name. This lets you view all traces for a PR in Langfuse's Sessions view.

Supported CI env vars:

  • GITHUB_REPOSITORY, PR_NUMBER / GITHUB_PR_NUMBER (GitHub Actions)
  • CI_PROJECT_PATH, CI_MERGE_REQUEST_IID (GitLab CI)

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

QualOps Code Quality Analysis

Status: ⚠️ WARNINGS - Medium severity issues found

Summary

  • Total Issues: 1
  • Critical: 0 🔴
  • High: 0 🟠
  • Medium: 1 🟡
  • Low: 0 🟢
  • Files Analyzed: 21

🟡 Medium Issues (1)

  • src/observability/langfuse-adapter.ts:139 - security
    Unvalidated external URL from environment variable enables credential exfiltration

📊 Full Report

View detailed report


Powered by QualOps

@valdis valdis force-pushed the observability-instrumentation branch from ce71577 to ff79ddc Compare April 8, 2026 14:46
@valdis valdis requested a review from Codesleuth April 8, 2026 21:09
Copy link
Copy Markdown

@nherment nherment left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okish. It doesn't look like this PR was self-reviewed.

Some comments, those with a * are blocking the PR:

  • In the future, please share smaller PRs, easier to digest and review.
  • * obsCtx is passed down as argument. I'm pretty sure you only need to manually connect a span to a parent at the boundary of the program, which at this stage should not be needed in qualops.
  • * In at least some instances, spans can be left dangling because they manually wrap code that can throw and are neither using withSpan nor are they wrapping the exception code with a try/finally.

@Codesleuth Codesleuth changed the base branch from main to validate-config April 10, 2026 19:14
@Codesleuth
Copy link
Copy Markdown
Collaborator

If you're stacking PRs, can you make sure the commits are identical and chain them by branch? This PR has a lot of commits it doesn't need.

@valdis valdis force-pushed the validate-config branch 2 times, most recently from 013e3c5 to 4d98423 Compare April 14, 2026 08:25
valdis added 2 commits April 15, 2026 10:53
Add distributed tracing to the multi-stage review pipeline using
@opentelemetry/api with @langfuse/otel as the OTLP backend. Traces
both file-by-file mode (job → pass → file-review generations) and
agentic mode (job → per-turn generations). Migrate eval runner from
direct Langfuse SDK tracing to OTel, keeping Langfuse SDK for dataset
management and scoring APIs only.
@valdis valdis force-pushed the observability-instrumentation branch from ff79ddc to 60e23d0 Compare April 15, 2026 07:59
@valdis valdis changed the base branch from validate-config to main April 15, 2026 09:56
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.

3 participants