4 ms·
Depends what you're trying to accomplish. We're using middleware to start spans for http and message handlers, and then adding `startSpan` where we need. I do
by pondidum 3y ago
Depends what you're trying to accomplish.
We're using middleware to start spans for http and message handlers, and then adding `startSpan` where we need.
I don't see a problem with `startSpan` everywhere as it's not much noiser than the `log.info` that would be there instead if we didn't have otel.
- _boffin_ 3y agoI started my APM journey when using Spring w/ Java and fell in love with how i can trace the entire flow through the entire application and then just config on how many spans i want to send over and what sample rate i want collected. I'd love to accomplish that. What you mentioned is all nice and well (optimal route), but right now, i'm working with some applications that needs it, but has i don't even know how many methods / classes that i'd need to go through and implement it on.
- Spivak 3y agoI think my major pain point with them being everywhere is unlike a log they push a new stack frame and closure. They make tracebacks so much more annoying, yes I know the error happened in a start span, thank you. I wish observability actually observed more than it contributed. Once https://peps.python.org/pep-0669/ https://peps.python.org/pep-0669/ is available I'm gonna try my damndest to get otel working through it. Just give me a config file that says what functions you're interested in and I'll do the rest.
- pondidum 3y agoAgreed the amount of stuff showing in stack traces can be annoying - but it does depend on language. I agree 100% in javascript/typescript its annoying, and I would love to get rid of them, In go however, there isn't an extra stack frame. Nor in C# thinking about it. The config file of functions to trace is a really interesting idea. How would you handle wanting to add data to the spans from inside those functions though? e.g. I want to add all kinds of props to the spans that can't be known except inside the function executing.