OpenTelemetry GenAI Spans Prompts को स्थायी Logs में बदल सकते हैं
OpenTelemetry के GenAI conventions मॉडल inputs और outputs की configurable capture देते हैं। Prompt content को sensitive data मानें, सामान्य observability metadata नहीं।
OpenTelemetry trace, application द्वारा process किए गए हर prompt, document excerpt या model response की दूसरी copy बन सकता है। यह debugging में मददगार है, लेकिन sensitive content को collectors, exporters और retention systems तक भी पहुँचा सकता है, जो operational metadata के लिए बनाए गए थे।
OpenTelemetry के GenAI semantic conventions मॉडल और agent operations के लिए spans, events और metrics तय करते हैं। इन conventions का मौजूदा status Development है, और event guidance कहती है कि content capture configure होने पर instrumentation user inputs और model responses capture कर सकते हैं। Design का निर्णय आपका है: trace inference का वर्णन कर सकता है, बिना उसका payload रखे।
Operation metadata और content अलग रखें
उपयोगी inference span में operation, model name, provider, duration, status, token count और low-cardinality error type दर्ज किए जा सकते हैं। ये fields operational सवालों के जवाब देते हैं: कौन-सा model धीमा है, requests कितनी बार विफल होती हैं, या deployment के बाद token usage बदला है या नहीं।
Prompt और response bodies अलग तरह की जानकारी देते हैं। उनमें account details, personal information, user द्वारा paste किए गए credentials, health data, customer documents या internal instructions हो सकते हैं। Capture होने के बाद content SDK buffer, collector queue, trace backend, search index, backup या incident screenshot में copy हो सकता है। हर destination access और deletion नियंत्रित करने की एक और जगह बन जाता है।
GenAI conventions content capture को configure करने देते हैं; उदाहरण के लिए केवल events में या spans और events दोनों में capture करना। इस switch को पूरा privacy control न समझें। Instrumentation library attributes जोड़ सकती है और application code या exporter अलग से request तथा response data जोड़ सकता है।
Production में content न लेना default बनाएँ
Prompt और response content को routine production telemetry से बाहर रखें। Service health और cost analysis में काम आने वाला metadata भेजें, और rendered prompt की जगह prompt templates या version labels इस्तेमाल करें। Tool arguments, retrieved passages, user identifiers या conversation history को “debug context” के रूप में दर्ज न करें।
यदि production investigation में content सचमुच जरूरी हो, तो capture को अस्थायी और उद्देश्य-सीमित diagnostic mode मानें। स्पष्ट configuration change अनिवार्य करें, प्रभावित service और समय-सीमा सीमित रखें, access केवल नामित responders को दें और capture शुरू होने से पहले छोटा deletion deadline तय करें। चल रहे incident में सुविधा के लिए global content capture चालू न करें।
Sampling privacy boundary नहीं है: sampled trace में भी पूरा payload रहता है। इसी तरह, नाम को hash से बदलने पर prompt anonymous नहीं हो जाता, यदि text या आसपास के attributes से व्यक्ति की पहचान हो सकती है। अधिक सुरक्षित तरीका है कि operational सवाल हल करने के लिए गैर-ज़रूरी content एकत्र ही न किया जाए।
Source और collector दोनों जगह filter करें
Instrumentation settings से शुरुआत में ही sensitive content emit होने से रोकें। Telemetry के बाहरी exporters या लंबे समय के storage तक पहुँचने से पहले collector-side filtering या redaction को defense in depth के रूप में जोड़ें। OpenTelemetry की security guidance attribute, filter, redaction और transform processors बताती है, लेकिन बाद की processing पहले buffer या exporter में हुए exposure को वापस नहीं ले सकती।
वास्तव में export हुए payload की जाँच करें, केवल dashboard view की नहीं। Canary strings वाले synthetic prompts भेजें, collector boundary पर spans और events देखें और पुष्टि करें कि prompts, responses, secrets तथा personal fields मौजूद नहीं हैं। Instrumentation upgrade के बाद test दोहराएँ: semantic conventions और library defaults बदल सकते हैं, और नया attribute data flow बढ़ा सकता है।
अंत में, trace data के लिए अलग access और retention policy रखें। Observability systems में अक्सर application database से अधिक engineers को access होता है और data ज्यादा समय तक रखा जाता है। Debug metadata कम रखें, स्वीकृत diagnostic stream को routine telemetry से अलग करें और queues, indexes तथा backups में deletion व्यवहार स्पष्ट करें।
Comments
Loading comments…