tmc / langchaingo

LangChain for Go, the easiest way to write LLM-based programs in Go
https://tmc.github.io/langchaingo/
MIT License
5.09k stars 651 forks source link

Integration with Observability platform(s) through callbacks #652

Open sansmoraxz opened 9 months ago

sansmoraxz commented 9 months ago

This library is missing integration with observability platforms through callbacks.

OpenTelemetry has a go sdk and thus should be easiest to integrate.

devalexandre commented 9 months ago

@sansmoraxz you can integrate easier but, you can use a example here it doesn't make sense to have something observable within the library

sansmoraxz commented 9 months ago

This came from the fact that the some python sdks have a bunch of integrations viz. https://docs.llamaindex.ai/en/stable/module_guides/observability/observability.html

@sansmoraxz you can integrate easier but, you can use a example here it doesn't make sense to have something observable within the library

Sure if it makes sense. Just wanna state that having a nested module would prevent proliferation of the dependencies and help anyone set up their projects with some basic observability. Plain logging doesn't cut it for most use cases. Hell even the langchain official got langsmith integration.

devalexandre commented 9 months ago

@sansmoraxz but langsmith is a langchain product, they have a product for that, in an opensource project make a module because it is very difficult and difficult to maintain

sansmoraxz commented 9 months ago

I get the point, I just cited as an example. Surely you are not asking every user to create their own callbacks for capturing standard traces and metrics.

sansmoraxz commented 9 months ago

My point is at least one observability platform should be integrated whatever it may be.