Skip to content

improvement(logfire): scope block outputs per operation and refresh brand chrome - #6178

Merged
waleedlatif1 merged 4 commits into
stagingfrom
fix/logfire-integration-validation
Aug 2, 2026
Merged

improvement(logfire): scope block outputs per operation and refresh brand chrome#6178
waleedlatif1 merged 4 commits into
stagingfrom
fix/logfire-integration-validation

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Validated the Pydantic Logfire integration end to end against the official Query API docs and the pydantic/logfire SDK source. The wire contract was already correct — endpoints, include_schema, deployment_environment as an array, the 2020-01-01 min_timestamp fallback, the token-region regex, and all 15 records columns all check out.
  • Gated each block output on the operations that actually return it. Previously every operation advertised all six outputs, so Get Token Info surfaced rows/rowCount/columns/sql it never returns, and Run SQL Query surfaced sql/organizationName/projectName.
  • Swapped in the official Logfire mark and moved the block to a black tile with the brand magenta (#E620E9) as iconColor for bare renders.
  • Moved host to advanced mode (self-hosting is rare; region was already advanced) and alphabetized the four tool registry entries.
  • Added two skills grounded in documented use cases: track-logfire-llm-cost (from Logfire's LLM-cost cookbook) and verify-logfire-token-target.

Type of Change

  • Improvement

Testing

55/55 Logfire tool tests pass. Typecheck reports no errors in any changed file, lint is clean, and I verified at runtime that the block resolves from BLOCK_REGISTRY, its meta from BLOCK_META_REGISTRY, all four tools.access entries exist in the tool registry, and the operation dropdown maps 1:1 to them. Docs regenerated. Not yet exercised against a live Logfire read token.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 2, 2026 1:16am

Request Review

@cursor

cursor Bot commented Aug 2, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Changes are mostly block metadata, docs, icons, and agent skill text; output conditions improve UX without altering API wire behavior described as already correct.

Overview
Logfire block and docs tighten how outputs appear in the UI: each field is gated on the operation that actually returns it (rows/rowCount/columns/sql vs token-info fields), Get Token Info docs now include expiresAt and spendingCapReachedAt, and record kind documents pending_span. Branding moves to a black tile with magenta icon color, the Logfire SVG is updated (sim + docs copies), and self-hosted Host is advanced mode.

Two new block skills (track-logfire-llm-cost, verify-logfire-token-target) join the meta templates. Generated artifacts (integrations.json, docs .mdx, icons mirror, tool-metadata) are refreshed to match.

validate-integration guidance (agents, Claude, Cursor) adds a Regenerate Derived Artifacts section (tool-metadata:generate, generate-docs, diff/revert drift), expands post-fix checks (tests, regen), and extends the checklist for CI gates.

Reviewed by Cursor Bugbot for commit 913f067. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR refines the Logfire integration’s operation-specific output metadata, token information, timestamp and limit normalization, and visual branding.

  • Scopes block outputs to the operations that return them.
  • Adds token expiry and spending-cap status fields.
  • Refreshes the Logfire icon, colors, generated metadata, and documentation.
  • Expands integration-validation guidance and adds two usage templates.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/blocks/blocks/logfire.ts Correctly scopes each declared output to the Logfire operations whose tools return it and updates block branding and templates.
apps/sim/tools/logfire/get_token_info.ts Maps nullable token expiry and spending-cap fields into tool outputs with corresponding metadata.
apps/sim/tools/logfire/utils.ts Preserves hour-only timezone offsets and safely coerces finite numeric-string limits.
apps/sim/tools/logfire/types.ts Extends token-info response types and documents the pending-span record kind.
apps/sim/tools/generated/tool-outputs.ts Regenerates tool output metadata following the Logfire output changes.

Reviews (4): Last reviewed commit: "chore(skills): sync validate-integration..." | Re-trigger Greptile

…rand chrome

- gate each block output on the operations that actually return it
- swap in the official Logfire mark, black tile with brand-magenta bare icon
- move host to advanced mode and alphabetize the tool registry entries
- add track-logfire-llm-cost and verify-logfire-token-target skills
…fields

- accept a numeric-string limit so agent-invoked calls stop silently
  falling back to Logfire's 100-row default
- keep an hour-only UTC offset intact instead of producing +05Z
- surface expiresAt and spendingCapReachedAt on Get Token Info
- document pending_span as a fourth record kind
@waleedlatif1
waleedlatif1 force-pushed the fix/logfire-integration-validation branch from 081f3fb to 80ed39e Compare August 2, 2026 01:00
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread apps/sim/tools/logfire/get_token_info.ts
… skill

- regenerate apps/sim/tools/generated/tool-outputs.ts, which CI's
  tool-metadata:check requires after a tool output change
- add the regeneration step and artifact-diff guidance to the
  validate-integration skill so the gate stops being missed
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 509865f. Configure here.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 913f067. Configure here.

@waleedlatif1
waleedlatif1 merged commit 9064039 into staging Aug 2, 2026
26 of 27 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/logfire-integration-validation branch August 2, 2026 01:16
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