146 points · by ellieh · 2y ago · 79 comments
The llm integration seems promising but if you care about LLM observability you probably also care about evals, guardrails and a million other things that are very specific to LLM's. Is it possible to build all this under one platform?
I do hope I'm wrong for the sake of pydantic-core.
I understand why this might be your reaction, but let me just share my thoughts:
Can we build all the LLM things people want? Yes I think so, early feedback is that Logfire is already much more comprehensive than LLM specific solutions.
How is our solution any different? AFAIK:
* no one else offers opinionated wrapper for OTel to make it nicer to use, but with all the advantages
* no one else does auto-tracing (basically profiling) using import hooks the way we do
* no one else has dedicated instrumentation for OpenAI or Pydantic
* no one else provides metadata about python objects the way we do so we can render a semi-faithful repr of complex objects (Pydantic models, dataclasses, dataframes etc.) in the web UI
* no one else (except Sentry, who are doing something different) makes it really easy to start using it
* no one else lets you query observability data with SQL
In my mind, the obvious alternative would be to do the thing most OSS companies do, and build "Pydantic Cloud", then start adding features to that instead of the open source package. I didn't want to do that, and I don't think our users would like that either.
In the end I decided to build Logfire for two reasons:
1. I wanted it, and have wanted it for years
2. I think building a commercial product like this, then using OSS to spread the word and drive adoption is a really exciting way to incentivize us to make the open source as good as possible — good as-in permissive and good as-in well maintained. And it means that our commercial success is not in tension with the adoption of our open source, which has been a recurring issue for companies trying to capitalize on their open source brand.
Sadly I've moved on from Python world.
Funny anecdote, using Pydantic everywhere to improve maintainability made me realize I'm fighting an uphill battle with Python and I should move to a statically typed language, so I switched to C#.
Thanks for your work.
I've actually really wondered why one wants static typing, especially with a language as expressive as Python, and where you can be so efficient with it?
At a time, I was mesmerized with Zope (esp 3), but learned that nobody really learns to use it, but instead learns to work around it — for the uninitiated, Zope provided "interfaces", you'd have classes implementing those interfaces, and you could happily mix and match with "configuration" that lived in ZCML (an XML schema) files, way back in early 2000s.
Static typing really kills off some of the biggest benefits of using Python (like "duck typing" to quickly emulate an identical API without having to construct a hierarchy of types before you can do that).
How many bugs have you really hit in your Python code because of lack of static types? For ~20 years of doing Python, I honestly believe that it could have helped me at most once or twice. Generally, doing sufficient level of testing has covered most potential misuse of code, and you need to have tests anyway.
The reason I'd want to move away from Python is mostly pure performance (loops should not be this slow) and library ecosystem (crappy code has risen to the top), but I find nothing is nearly as expressive, has a comparable standard library plus allows one to be so efficient.
Maybe it's the Python disease of trying to be everything at once, which can end up as the worst of all worlds.
Ruby is a proudly untyped language, and that's all it is.
[1] https://github.com/Scale3-Labs/langtrace [2] https://github.com/open-telemetry/semantic-conventions/blob/...
Certainly seems like the Logfire initializer could coexist with code like in https://docs.honeycomb.io/send-data/logs/opentelemetry/sdk/p... - is this a reasonable assumption? We're looking into modernizing our Honeycomb integration from their older direct integration to their OTel SDK, and would be very curious if Logfire can exist alongside this. Do you do any patching of OTel internals that would make this impossible?
I don't think we currently expose an easy way for you to send data to two (e.g. honeycomb and logfire), it it should be entirely doable, and if people want that, we can make it easy.
I think Pydantic is great software and so I am inclined to see if this too will be great software.
My current company, a much small startup, primarily uses Datadog and we are starting to better integrage Honeycomb. We mostly abandoned Google Cloud Monitoring because the UI/UX are not that great. Honeycomb is a paradigm, so took some time for us/me to understand. It's growing on us.
Despite the ability to completely blow up our bill (which is now better controlled), Datadog is a good product that lets us quickly answer questions when things go wrong. It's not perfect, but it's the best we have right now. The UI is intuitive, and facilitates more discovery (esp. for metrics and their attributes).
(esp. for metrics and their attributes).
but OP isn't about metrics at all rather traces.Gotta echo the sentiment that Logfire doesn't seem to be too closely related to Pydantic... Also, afaict it looks like the frontend is not open source, unless I'm missing something [2]. So, not a tool that one could self-host?
--
Operating AI apps reveals a big challenge, in that debugging probabilistic code paths requires more than the usual introspective abilities, and in an environment where function calls can have very real monetary impact we have to be able to see what’s happening in the runtime. See LangChain’s hosted solution (can’t recall the name) that allows an operator to see prompts and responses “on the wire”. (It just occurred to me that Langchain and Pydantic have a lot in common here, in approach.)
Having a coupling between Pydantic - which is *just about* the data layer itself - and an observability tool seems very interesting to me, and having this come from the folks who built it does not seem unreasonable. WRT open source and monetization, I would be lying if I said I wasn’t a little worried - given the recent few months - but I am choosing to see this in a positive light, given this team’s “believability weight” (to overuse Dalio) and history of delivering solid and really useful tooling.
The most important thing is that you share with us WHY you want to self host. Is it compliance? What does that compliance mean (min/max data retention, right to be forgotten, data at rest needs to be geographically located or you have to own it, etc)? This will help us build the “right” kind of features in this area so that it works for you and your company.
I like the prefect.io approach to have the control plane on the external provider, with the data and workers being run on the customer infrastructure. It seems fair for both sides: - as the subcontractor, you keep trace of the real usage, without having to handle end user data which is a pain to manage, so you don't have to offer outrageous license pricing to compensate for being stolen (looking at you Grafana) . - as the company, you comply with gdpr, while alleviate the operating costs, and also supporting the companies providing the tooling you need.
In my case, I am hesitate to add another cloud service in the Sub-Processor list to meet GDPR.
Actually, if it is an Otel wrapper, I don't think you don't need to offer self-hosting the server at all. Making easy to integrate with other Otel ecosystems would be enough.
> It would be more of a licensing setup.
At least this is much better than FOSS first than switching to a non-FOSS license like what happened to hashicorp and redis.
We decided to self host sentry, which is an absolute beast to deploy, the open-source helm chart is nowhere near production level, and the underlying technologies are quite hard to maintain (Kafka, zookeeper, clickhouse...). We had to work on it constantly for two months to stabilize it, and now fear the moment we'll want to update. The dev teams love it, so it was worth the hassle!
I think there's a less-misleading way to use open-source reputation for business credibility, though: "so-and-so business, by the creators of so-and-so project". Knowing that respected and skilled folks are working on a business is great! It's a fine distinction, but I think it matters.
Other than that, see my answer to the other comment.
But to be fair, the branding here is a little weird. If you were living under a rock and hadn't heard of pydantic then the website reads like pydantic is the company and logfire is a product of said company. That's fine. But then you've also got a product called pydantic. Or is it now called pydantic pydantic? I realise it's kind of an extension to pydantic but the AI focus doesn't make it feel that way and so I think that's where the GP is coming from. Sorry to nitpick, I hope it does well.
We could have called the company a completely new name and everyone would have been confused, or just called us "pydantic".
I think Pydantic being the company name, and a standalone entity, and there being other products is fairly common. I think if Logfire is successful, it will end up just being known as "Logfire".
Google was originally just the search engine, without any qualifier. Now it's Google Search. In the same way, pydantic can become "Pydantic Validate" or something.
From the team behind Pydantic, Logfire is a new type of observability platform built on the same belief as our open source library — that the most powerful tools can be easy to use.
We also have explicit integrations with popular logging packages (see the bottom of https://docs.pydantic.dev/logfire/integrations/#opentelemetr...), so if you use the standard library `logging` module, `structlog`, or `loguru`, you should be able to set up your logs to ship to Logfire with minimal modifications to your existing code.
While we have not announced our pricing yet, I am confident that tens of millions of log lines a month will absolutely be economical to store.
(Also, I'll just add that we also support metrics, though our metrics support is not as well-integrated yet as tracing. But soon!)
Try not to surprise us on pricing, though.
Could you clarify if it's possible to self-host the service?
I want the entry level for "enterprise" to be much lower than some other companies in this space.
(That being said, I am a sucker for all new tooling in this genre and am excited to play around with it!)