What should you put in span attributes and what should you avoid?
BeginnerProductionTracing & Sampling
Answer
Use OpenTelemetry semantic conventions: http.request.method, http.route, http.response.status_code, db.system, server.address, plus useful business IDs (order.id, tenant.id). Traces handle high cardinality fine. Avoid secrets, tokens, full request bodies, card numbers and personal data; use the collector's redaction or attributes processor as a safety net.
More on Tracing & Sampling
In production, when do you pick tail-based over head-based trace sampling, and what does it cost you?BeginnerHow do you configure head sampling correctly in OpenTelemetry?BeginnerHow do you set up tail sampling in the OpenTelemetry Collector?IntermediateWhy does tail sampling need a load-balancing tier, and how do you build it?AdvancedHow do you combine head and tail sampling in a high-traffic system?AdvancedHow do you get accurate RED metrics if traces are sampled?Intermediate