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.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Tracing & Sampling