SShortSingh.
Back to feed

Bug in Sentry JS SDK logs each Google GenAI streaming tool call twice with mismatched data

0
·1 views

A bug in Sentry's JavaScript SDK causes tool calls made during Google GenAI streaming sessions to be recorded twice in the span attribute gen_ai.response.tool_calls. The duplicate entries stem from two separate code paths in the streaming instrumentation file both reading the same underlying data — once via the SDK's chunk.functionCalls accessor and once by iterating candidate content parts directly. The two duplicate entries also disagree on key naming, using 'args' in one and 'arguments' in the other, which can mislead any downstream system counting tool invocations. The non-streaming path in the same SDK does not have this issue, as it reads tool calls only once from the SDK accessor. The proposed fix removes the redundant second push and standardises the streaming path to use the same single-source accessor already trusted by the non-streaming code.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Agent-Ready Websites Emerge as Core Product Architecture Decision in 2026

At Google I/O 2026, Chrome introduced WebMCP as infrastructure enabling websites to expose structured actions directly to AI agents, signaling a fundamental shift in how websites must be designed. A 2026 study across 300 agent runs found that agent-ready e-commerce interfaces achieved an 89.3% task success rate compared to just 49.3% for conventional websites. Unlike traditional sites built solely for human navigation, agent-ready websites must also allow AI agents to interpret content, verify permissions, and execute tasks reliably without ambiguity. Security researchers have flagged risks alongside the opportunity, warning that autonomous agents can be manipulated through malicious tools and deceptive instructions. Experts now frame agent readiness not as an SEO tactic but as a product architecture discipline spanning UX design, backend engineering, data structure, and security.

0
ProgrammingDEV Community ·

GoodBarber MCP Server Listed as Official ChatGPT Plugin for App Management

No-code app builder GoodBarber has been listed in the official ChatGPT plugin directory, allowing users to manage their apps directly through the chat interface. The integration enables control over content, catalogs, member management, and push notifications via GoodBarber's existing MCP server, which also supports Claude, Codex, and Cursor. Users can connect through the directory without enabling developer mode or manually entering any URLs, lowering the barrier for non-technical app owners. Each connection is scoped to a single app and secured through an OAuth browser flow, with no API keys required. GoodBarber notes that while building the server was a technical challenge, securing a directory listing is what makes the tool accessible to the broader audience it was designed for.

0
ProgrammingDEV Community ·

Silent WooCommerce bug hid free trial offers from all new visitors, killing signups

A custom code snippet on Rev6.fit, a WordPress-based fitness membership platform, silently removed 7-day free trial messaging for all logged-out visitors — effectively every potential new customer. The bug lived inside a repeat-trial guard designed to prevent existing users from claiming a second free trial, but its logic also stripped the trial from guests who had no user account to check. No errors were thrown, and monitoring tools including Sentry showed nothing unusual, meaning the issue was only caught when a client contact manually noticed the trial labels had disappeared from product pages. The root cause was a flawed condition that treated unverifiable guest eligibility the same as confirmed ineligibility, despite the platform's architecture already preventing guests from claiming a trial without first creating an account. The fix required only removing the guest-user branch from the condition, preserving the repeat-trial protection while restoring trial visibility for new visitors.

0
ProgrammingDEV Community ·

How Competitive GeoGuessr Logic Can Help Verify Photo Locations Reliably

A developer behind a photo-location tool has outlined a structured decision-tree method for identifying countries from street-level images, drawing on techniques used by competitive GeoGuessr players. The approach involves filtering candidate countries using observable clues such as driving side, road markings, bollard types, licence plate shapes, and written scripts. Soft clues like terrain, vegetation, and architecture can help break ties but are treated as less reliable since they frequently cross national borders. The author cautions that a single country name as output is not a verifiable explanation, and recommends using at least three independent visual anchors before labelling a location as likely. When clue density is low — such as in indoor scenes or heavily cropped images — the method advises reporting regional uncertainty rather than forcing a precise pin.

Bug in Sentry JS SDK logs each Google GenAI streaming tool call twice with mismatched data · ShortSingh