feat: add basic opentelemetry tracing support#75
feat: add basic opentelemetry tracing support#75codefromthecrypt wants to merge 5 commits intoblock:mainfrom
Conversation
anuraaga
left a comment
There was a problem hiding this comment.
Just some drive-by comments requested by @codefromthecrypt, nothing should be considered authoritative or even beyond nits
| self.exchange.add(message) | ||
| self.reply() # Process the user message. | ||
| except KeyboardInterrupt: | ||
| span.set_status(OtelStatus(OtelStatusCode.ERROR, "KeyboardInterrupt")) |
There was a problem hiding this comment.
This is an interesting case. I don't know if an explicit interrupt would actually be an error for the user, it's expected to fail - a browser comparison would be closing a tab during a request, it would be common for the request to still complete on the server side and be green. Anyways, it's probably correct to set it as an error though not fully confident
There was a problem hiding this comment.
added a comment as I don't know yet, either, but maybe after some practice someone will.
There was a problem hiding this comment.
hey idea.. maybe we set it to ok, but leave the interrupt?
|
excellent feedback @anuraaga, thanks for dropping by! |
Signed-off-by: Adrian Cole <adrian.cole@elastic.co>
|
closing as moved to rust |
This adds basic setup for tracing and some tests as a toe-hold. Later pull requests here can enhance the traces with more data. This would be even better if LLM spans were added as discussed here square/exchange#33
Meanwhile, this is what a trace looks like running against ollama using otel-tui as the tracing backend
If any maintainers have any glitch fixes they also have my permission to push directly to this branch.