Span or Attribute? in OpenTelemetry custom instrumentation 0 ▲ Jessitron 220 days ago · Tech · hide · Fediverse post 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… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town