-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix: Correcting Makeplane integration details #15371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add four comprehensive real-world examples with sample repositories - E-Commerce Checkout Flow (Crash Commerce) - Media Upload with Background Processing (SnapTrace) - Search Autocomplete (NullFlix) - Manual LLM Instrumentation (Customer Service Bot) - Fix high-cardinality span name in payment processing - Add missing gen_ai.response.model attribute to AI agent span - Include implementation guidance and monitoring recommendations
- Fix duplicate finalResponse declaration (line 719) - Fix undefined uploadId reference, use uploadData.jobId instead (line 224) - Fix function name mismatch, call searchKnowledgeBase instead of executeKnowledgeBaseSearch (line 708)
- Serialize processing.operations array with JSON.stringify() - Ensures proper attribute serialization in Sentry spans - Follows Sentry conventions for non-primitive span attributes
File Upload Example: - Use proper queue operations (queue.publish/queue.process) - Add queue instrumentation attributes (messaging.*) - Implement trace continuation with continueTrace() - Link to Queues Module documentation - Align span names with queue docs pattern (queue_producer/queue_consumer) Search Autocomplete Example: - Change manual span from http.client to function op - Let SDK auto-instrument fetch requests - Don't re-throw AbortError to avoid sending to Sentry - Return empty results on abort instead LLM Example: - Add link to AI Agents Module documentation - Reference gen_ai attribute specifications All changes follow Sentry's documented conventions and patterns.
Remove ✨ and ❌ emoji characters from code examples that were causing 'InvalidCharacterError: Failed to execute atob' errors in docs. The atob function only supports Latin1 (ISO-8859-1) characters, and emojis are outside that range, causing encoding issues during page rendering.
Replace em dashes (—) with hyphens (-) and arrows (→) with (->) These Unicode characters were causing 'atob' encoding errors: 'InvalidCharacterError: Failed to execute atob on Window' The atob function only supports Latin1 (ISO-8859-1) characters. All special Unicode characters have been replaced with ASCII equivalents.
The high-cardinality fix was reverted during rebase.
Changed back from template literal to static name:
- name: 'Charge Payment Provider' (not `Charge ${requestedProvider}`)
This attribute was lost during the rebase and needs to be present in the frontend invoke_agent span for proper AI monitoring.
Replace 'Coming soon' with link to actual example repository: https://github.com/getsentry/llm-manual-agent-monitoring-example This repo demonstrates custom AI agent instrumentation with tool calls, token tracking, and conversation monitoring.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
| ```typescript | ||
| // Async media processing (runs in background via setImmediate) | ||
| export async function processMedia(job: ProcessingJob): Promise<void> { | ||
| // Continue trace from producer using stored trace headers | ||
| Sentry.continueTrace( | ||
| { sentryTrace: job.sentryTrace, baggage: job.sentryBaggage }, | ||
| () => { | ||
| // Parent span for the consumer transaction | ||
| Sentry.startSpan( | ||
| { | ||
| name: 'media_processing_consumer', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Sentry.continueTrace's synchronous callback does not await nested async Sentry.startSpan operations, causing premature trace completion.
Severity: CRITICAL | Confidence: 0.98
🔍 Detailed Analysis
The synchronous callback provided to Sentry.continueTrace initiates asynchronous operations within nested Sentry.startSpan calls, specifically await optimizeImage() and await generateThumbnail(). However, the outer synchronous callback does not await the Promise returned by Sentry.startSpan(). This causes the processMedia function to complete and the trace to potentially end before the actual asynchronous media processing finishes, leading to incomplete trace data and lost trace context.
💡 Suggested Fix
Modify the callbacks to Sentry.continueTrace and Sentry.startSpan to be async and ensure that the Promises returned by inner startSpan calls are properly awaited or returned up the call chain.
🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: docs/platforms/javascript/common/tracing/span-metrics/examples.mdx#L315-L325
Potential issue: The synchronous callback provided to `Sentry.continueTrace` initiates
asynchronous operations within nested `Sentry.startSpan` calls, specifically `await
optimizeImage()` and `await generateThumbnail()`. However, the outer synchronous
callback does not await the Promise returned by `Sentry.startSpan()`. This causes the
`processMedia` function to complete and the trace to potentially end before the actual
asynchronous media processing finishes, leading to incomplete trace data and lost trace
context.
Did we get this right? 👍 / 👎 to inform future reviews.
No description provided.