Vibe Coding Needs Telemetry — DeepSeek Tips & Insights
    Neura MarketNeura Market/DeepSeek
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsGamesBlogVideosGuidesCoursesCommunityTrending
    DeepSeekBlogVibe Coding Needs Telemetry
    Back to Blog
    Vibe Coding Needs Telemetry
    backend

    Vibe Coding Needs Telemetry

    Aquil Abdullah March 26, 2026
    0 views

    AI can generate endpoints quickly, but telemetry reveals what your system is actually doing. A real-world look at the N+1 query problem.


    title: Vibe Coding Needs Telemetry published: true description: AI can generate endpoints quickly, but telemetry reveals what your system is actually doing. A real-world look at the N+1 query problem. tags: backend, ai, observability, performance cover_image: https://www.aquilabdullah.com/images/876.jpg

    Originally published at: https://www.aquilabdullah.com/your-post-url


    I recently noticed something strange in the backend telemetry of a code base that I was working on.

    A single API request was triggering more than twenty database calls.

    The code looked perfectly reasonable, but the telemetry told a very different story.


    A Simple Vibe Coding Exercise

    Imagine you're building a simple profile endpoint.

    You ask your AI assistant to create something that returns:

    • user information
    • the sports they participate in
    • posts they've written
    • events they're attending

    A reasonable implementation might look like this:

    user = get_user(user_id)
    sports = get_user_sports(user_id)
    posts = get_user_posts(user_id)
    events = get_user_events(user_id)
    
    return {
        "user": user,
        "sports": sports,
        "posts": posts,
        "events": events
    }
    

    At first glance, this looks great.

    Each function is small.
    Each responsibility is clear.
    The code is readable and easy to test.

    From the perspective of local code correctness, this is good code.

    But from the perspective of system behavior, something subtle may have just happened.


    The N+1 Query Problem

    If each of those helper functions hits the database, this endpoint just turned into multiple queries.

    Instead of one database call, we now have several.

    This pattern is known as the N+1 query problem.

    It usually appears when you:

    • run 1 query to fetch a list
    • then run N additional queries to fetch related data

    For example:

    get_users()
    
    for each user:
        get_posts(user)
    

    If you load 10 users, that becomes 11 queries.
    If you load 100 users, that becomes 101 queries.

    Each individual query is fast.

    But together they create unnecessary load and extra round trips.

    What started as clean, modular code quietly turns into a query fan-out pattern.


    When Telemetry Tells a Different Story

    It took me a minute to realize what I was looking at.

    The endpoint didn’t look suspicious, but the telemetry did.

    During a single request, I saw repeated database calls like this:

    21:15:40 GET /sports
    21:15:40 GET /users
    21:15:40 GET /event_rsvps
    21:15:41 GET /sports
    21:15:41 GET /users
    21:15:41 GET /event_rsvps
    

    The same resources being requested over and over again.

    The code looked clean.

    But the system was doing far more work than I expected.


    Why This Happens More With AI

    AI coding tools are very good at generating locally correct code.

    They optimize for:

    • readability
    • modularity
    • clear abstractions

    But they don’t automatically reason about:

    • query fan-out
    • database round trips
    • system-level performance

    So you end up with code that looks right, but behaves differently than you expect at runtime.


    Fixing the Query Fan-Out

    Once you notice an N+1 pattern, the solution is usually to move more work into the database.

    Common approaches include:

    • JOIN queries
    • database views
    • materialized views
    • RPC functions

    In this case, I used a database RPC function.

    Instead of making multiple application-level calls, the database assembles the full result in a single operation.

    Conceptually:

    Before:
    API → many database calls
    
    After:
    API → single RPC → database assembles result
    

    This reduces round trips and makes the endpoint behavior predictable.


    The Observability Mindset

    What struck me most about this bug was that the code itself looked perfectly reasonable.

    Nothing obviously inefficient.

    But telemetry told a different story.

    That’s the shift that comes with AI-assisted development.

    We can generate systems faster than ever.

    But speed makes it easier to miss how those systems behave under the hood.

    Telemetry gives you visibility into:

    • how many queries an endpoint triggers
    • how requests flow through your system
    • where load is actually happening

    Without it, you're relying on what the code suggests.

    With it, you can see what the system is actually doing.


    Before and After

    Before the fix:

    Request → ~20 database queries
    

    After moving the logic into an RPC function:

    Request → 1 database call
    

    Same endpoint.
    Very different behavior.


    Closing Thought

    AI can generate endpoints quickly.
    Telemetry tells you what those endpoints are actually doing.

    Tags

    backendaiobservabilityperformance

    Comments

    More Blog

    View all
    Five Gemma-4 models, one accelerator: what porting E2B 31B to AWS Inferentia2 taught megemma

    Five Gemma-4 models, one accelerator: what porting E2B 31B to AWS Inferentia2 taught me

    I ported the whole Gemma-4 family — E2B, E4B, 12B, 31B, and the 26B-A4B MoE — to run on...

    X
    xbill
    Hey DEV, I'm Tobore. Let's actually connect.community

    Hey DEV, I'm Tobore. Let's actually connect.

    Hey DEV, I'm Tobore. Let's actually connect. I've been on here for a while now, mostly writing and...

    L
    Laurina Ayarah
    I burned through thousands of AI tokens. Then a friend did it for freeai

    I burned through thousands of AI tokens. Then a friend did it for free

    (yep, kinda clickbait, just for the funsies 😊) At the beginning of the year, I relaunched my...

    P
    Paulo Henrique
    Claude might be saturating your machineai

    Claude might be saturating your machine

    My laptop was sitting idle with the fan at full tilt. Nothing was running that I knew of. The culprit...

    S
    Sidhant Panda
    Automated GitHub Code Reviews Using Google Geminigithubactions

    Automated GitHub Code Reviews Using Google Gemini

    I Built a Thing! TL;DR — Google Gemini-based Pull Request reviews and Issue Triaging for...

    D
    Darren "Dazbo" Lester
    What is an "agentic harness," actually?ai

    What is an "agentic harness," actually?

    I've been hearing the word "harness" thrown around a lot lately. I assumed it just meant "the IDE" or...

    T
    Tilde A. Thurium

    Stay up to date

    Get the latest DeepSeek prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for DeepSeek and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Neura Market

    Custom AI Systems & Services

    Our team of experienced AI builders will help build custom AI systems, workflows, and solutions for your business.

    Request custom work

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this DeepSeek resource

    • Generate Visual Summary & Knowledge Graph Insights for Your Emailn8n · $24.99 · Related topic
    • Auto-Generate SEO Blog Posts with Perplexity, GPT, Leonardo & WordPressn8n · $14.99 · Related topic
    • Generate Personalized Language Learning News Digests with LLaMA-3.1 & DeepSeek AIn8n · $9.99 · Related topic
    • Auto-Generate Tech News Blog Posts with NewsAPI & Google Gemini to WordPressn8n · $9.99 · Related topic
    Browse all workflows