TL;DR: Attribute. More information on one event gives us more correlation power. It’s also cheaper. When you want to add some information to your tracing telemetry, you could emit a log, create a span, or add a piece of data to your current span. Adding a piece of data to your current span is the best! Usually. Attributes are the best, and also the cheapest. If you have request name, user ID, request properties, feature flags, and notes about what happened in a single event, then you can correlate feature flags with error rate number of items with latency which users hit the same stack trace The more data on the top-level span, the more answers you can get to “What is different about the requests that failed?”[1] More information in one place is better! You can say trace.getCurrentSpan().set_attribute(“my_module.items.count”, items.length) anywhere in your code, and accumulate data on a single event. This might be my favorite thing about OpenTelemetry tracing. Providers like Honeycomb…
No comments yet. Log in to reply on the Fediverse. Comments will appear here.