Skip to content

Conversation

@codefromthecrypt
Copy link
Collaborator

@codefromthecrypt codefromthecrypt commented Sep 18, 2024

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

Screenshot 2024-09-18 at 6 14 12 PM

If any maintainers have any glitch fixes they also have my permission to push directly to this branch.

Copy link

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a comment as I don't know yet, either, but maybe after some practice someone will.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey idea.. maybe we set it to ok, but leave the interrupt?

Signed-off-by: Adrian Cole <[email protected]>
@codefromthecrypt
Copy link
Collaborator Author

excellent feedback @anuraaga, thanks for dropping by!

Signed-off-by: Adrian Cole <[email protected]>
@michaelneale
Copy link
Collaborator

closing as moved to rust

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants