{"id":13472483,"url":"https://github.com/pydantic/logfire","last_synced_at":"2026-01-28T20:24:24.991Z","repository":{"id":237196938,"uuid":"790713784","full_name":"pydantic/logfire","owner":"pydantic","description":"Uncomplicated Observability for Python and beyond! 🪵🔥","archived":false,"fork":false,"pushed_at":"2025-05-01T21:11:30.000Z","size":46319,"stargazers_count":3059,"open_issues_count":117,"forks_count":112,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-05-01T22:23:37.847Z","etag":null,"topics":["fastapi","logging","metrics","observability","openai","opentelemetry","pydantic","python","trace"],"latest_commit_sha":null,"homepage":"https://logfire.pydantic.dev/docs/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pydantic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"docs/roadmap.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-23T11:50:23.000Z","updated_at":"2025-05-01T21:11:33.000Z","dependencies_parsed_at":"2024-05-02T12:26:15.331Z","dependency_job_id":"6e882fed-7458-42b7-ba14-85ec42155b01","html_url":"https://github.com/pydantic/logfire","commit_stats":{"total_commits":823,"total_committers":33,"mean_commits":"24.939393939393938","dds":0.6950182260024301,"last_synced_commit":"12a29ac6c116cee02856bbd1da816260f686d3ae"},"previous_names":["pydantic/logfire"],"tags_count":81,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pydantic%2Flogfire","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pydantic%2Flogfire/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pydantic%2Flogfire/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pydantic%2Flogfire/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pydantic","download_url":"https://codeload.github.com/pydantic/logfire/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252882779,"owners_count":21819152,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","logging","metrics","observability","openai","opentelemetry","pydantic","python","trace"],"created_at":"2024-07-31T16:00:55.032Z","updated_at":"2026-01-28T20:24:24.985Z","avatar_url":"https://github.com/pydantic.png","language":"Python","readme":"# Pydantic Logfire — Know more. Build faster.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/pydantic/logfire/actions?query=event%3Apush+branch%3Amain+workflow%3ACI\"\u003e\u003cimg src=\"https://github.com/pydantic/logfire/actions/workflows/main.yml/badge.svg?event=push\" alt=\"CI\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/pydantic/logfire\"\u003e\u003cimg src=\"https://codecov.io/gh/pydantic/logfire/graph/badge.svg?token=735CNGCGFD\" alt=\"codecov\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.python.org/pypi/logfire\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/logfire.svg\" alt=\"pypi\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/pydantic/logfire/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/pydantic/logfire.svg\" alt=\"license\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/pydantic/logfire\"\u003e\u003cimg src=\"https://img.shields.io/pypi/pyversions/logfire.svg\" alt=\"versions\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://logfire.pydantic.dev/docs/join-slack/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Slack-Join%20Slack-4A154B?logo=slack\" alt=\"Join Slack\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nFrom the team behind Pydantic Validation, **Pydantic Logfire** is an observability platform built on the same belief as our open source library — that the most powerful tools can be easy to use.\n\nWhat sets Logfire apart:\n\n- **Simple and Powerful:** Logfire's dashboard is simple relative to the power it provides, ensuring your entire engineering team will actually use it.\n- **Python-centric Insights:** From rich display of Python objects, to event-loop telemetry, to profiling Python code and database queries, Logfire gives you unparalleled visibility into your Python application's behavior.\n- **SQL:** Query your data using standard SQL — all the control and (for many) nothing new to learn. Using SQL also means you can query your data with existing BI tools and database querying libraries.\n- **OpenTelemetry:** Logfire is an opinionated wrapper around OpenTelemetry, allowing you to leverage existing tooling, infrastructure, and instrumentation for many common Python packages, and enabling support for virtually any language. We offer full support for all OpenTelemetry signals (traces, metrics and logs).\n- **Pydantic Integration:** Understand the data flowing through your Pydantic Validation models and get built-in analytics on validations.\n\nSee the [documentation](https://logfire.pydantic.dev/docs/) for more information.\n\n**Feel free to report issues and ask any questions about Logfire in this repository!**\n\nThis repo contains the Python SDK for `logfire` and documentation; the server application for recording and displaying data is closed source.\n\n## Using Logfire\n\nThis is a very brief overview of how to use Logfire, the [documentation](https://logfire.pydantic.dev/docs/) has much more detail.\n\n### Install\n\n```bash\npip install logfire\n```\n\n[_(learn more)_](https://logfire.pydantic.dev/docs/guides/first_steps/#install)\n\n## Authenticate\n\n```bash\nlogfire auth\n```\n\n[_(learn more)_](https://logfire.pydantic.dev/docs/guides/first_steps/#authentication)\n\n### Manual tracing\n\nHere's a simple manual tracing (aka logging) example:\n\n```python skip-run=\"true\" skip-reason=\"blocking\"\nfrom datetime import date\n\nimport logfire\n\nlogfire.configure()\nlogfire.info('Hello, {name}!', name='world')\n\nwith logfire.span('Asking the user their {question}', question='age'):\n    user_input = input('How old are you [YYYY-mm-dd]? ')\n    dob = date.fromisoformat(user_input)\n    logfire.debug('{dob=} {age=!r}', dob=dob, age=date.today() - dob)\n```\n\n[_(learn more)_](https://logfire.pydantic.dev/docs/guides/onboarding-checklist/add-manual-tracing/)\n\n### Integration\n\nOr you can also avoid manual instrumentation and instead integrate with [lots of popular packages](https://logfire.pydantic.dev/docs/integrations/), here's an example of integrating with FastAPI:\n\n```py skip-run=\"true\" skip-reason=\"global-instrumentation\"\nfrom fastapi import FastAPI\nfrom pydantic import BaseModel\n\nimport logfire\n\napp = FastAPI()\n\nlogfire.configure()\nlogfire.instrument_fastapi(app)\n# next, instrument your database connector, http library etc. and add the logging handler\n\n\nclass User(BaseModel):\n    name: str\n    country_code: str\n\n\n@app.post('/')\nasync def add_user(user: User):\n    # we would store the user here\n    return {'message': f'{user.name} added'}\n```\n\n[_(learn more)_](https://logfire.pydantic.dev/docs/integrations/fastapi/)\n\nLogfire gives you a view into how your code is running like this:\n\n![Logfire screenshot](https://logfire.pydantic.dev/docs/images/index/logfire-screenshot-fastapi-200.png)\n\n## Contributing\n\nWe'd love anyone interested to contribute to the Logfire SDK and documentation, see the [contributing guide](https://github.com/pydantic/logfire/blob/main/CONTRIBUTING.md).\n\n## Reporting a Security Vulnerability\n\nSee our [security policy](https://github.com/pydantic/logfire/security).\n\n## Logfire Open-Source and Closed-Source Boundaries\n\nThe Logfire SDKs (we also have them for [TypeScript](https://github.com/pydantic/logfire-js) and [Rust](https://github.com/pydantic/logfire-rust)) are open source, and you can use them to export data to [any OTel-compatible backend](https://logfire.pydantic.dev/docs/how-to-guides/alternative-backends/).\n\nThe Logfire platform (the UI and backend) is closed source. You can self-host it by purchasing an [enterprise license](https://logfire.pydantic.dev/docs/enterprise/).\n","funding_links":[],"categories":["Python","Openai","Observability","10. LLM \u0026 AI Observability"],"sub_categories":["Platforms"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpydantic%2Flogfire","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpydantic%2Flogfire","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpydantic%2Flogfire/lists"}