Skip to content

logfire/logfire-pycon-2024

Repository files navigation

Logfire Pycon 2024

Code snippets from:

  • this talk at Pycon US on 2024-05-16
  • this at EuroPython on 2024-07-12 (most of the talk was a live demo, so only a few slides)

The rest of the example from the logfire-demo project.

Running the demo

  1. Install uv
  2. Run uv sync to install dependencies
  3. Run uv run python {example file name}

SQL Queries

The queries from the SQL slide were:

select start_timestamp, (attributes->'response_data'->'usage'->>'total_tokens')::int as usage, attributes->'response_data'->'message'->>'content' as message
from records 
where otel_scope_name='logfire.openai' and attributes->'response_data'->'message' ? 'content'
order by start_timestamp desc

and

select sum((attributes->'response_data'->'usage'->>'total_tokens')::int)
from records where otel_scope_name='logfire.openai'

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages