v2.7.1 (2024-12-13)
- Fix erroneous
<circular reference>when object is repeated in list by @alexmojaki in #664
v2.7.0 (2024-12-11)
- Add
logfire.instrument_aws_lambdaby @Kludex in #657
v2.6.2 (2024-12-05)
- Update the
process.pidresource attribute afteros.fork()by @alexmojaki in #647 - Check for
os.register_at_forkbefore calling by @alexmojaki in #648
v2.6.1 (2024-12-05)
- Use
exc_infoin structlog processor by @alexmojaki in #641 - Re-seed random ID generator after
os.fork()by @alexmojaki in #644
v2.6.0 (2024-12-02)
- Add
instrument_sqlite3by @Kludex in #634
v2.5.0 (2024-11-27)
- Add
logfire.suppress_scopesmethod by @alexmojaki in #628 - Replace
ModuleNotFoundErrorbyImportErrorby @Kludex in #622
v2.4.1 (2024-11-21)
- Allow new context argument of metric instrument methods to be passed positionally by @alexmojaki in #616
v2.4.0 (2024-11-20)
- Support
logfire.instrumentwithout arguments by @Kludex in #607 - Handle internal errors in
create_json_schemaby @alexmojaki in #613 - Handle errors in auto-tracing better by @alexmojaki in #610
v2.3.0 (2024-11-14)
- Respect repr on fields when logging a dataclass by @dmontagu in #592
- Allow
extract_argsto be an iterable of argument names by @alexmojaki in #570 - Make metric instrument methods compatible with older OTel versions by @alexmojaki in #600
- Add span links by @Kludex in #587
v2.2.1 (2024-11-13)
- Ignore trivial/empty functions in auto-tracing by @alexmojaki in #596
- Handle missing attributes in
_custom_object_schemaby @alexmojaki in #597 - Let user know what they should install for integrations by @Kludex in #593
v2.2.0 (2024-11-13)
- Allow instrumenting a single httpx client by @alexmojaki in #575
- Log LLM tool call for streamed response by @jackmpcollins in #545
v2.1.2 (2024-11-04)
- Check
.logfirefor creds to respect'if-token-present'setting by @sydney-runkle in #561
v2.1.1 (2024-10-31)
- Use
functools.wrapsin@logfire.instrumentby @alexmojaki in #562 - Set
logfire.code.work_dirresource attribute whenever other code source attributes are present by @alexmojaki in #563 - Don't scrub
logfire.logger_nameby @alexmojaki in #564
v2.1.0 (2024-10-30)
- Add ASGI & WSGI instrument methods by @Kludex in #324
- Add
logfire.work_dirresource attribute by @Kludex in #532 - Add
logfire.configure(environment=...)by @Kludex in #557 - Show message from API backend when checking token fails by @alexmojaki in #559
v2.0.0 (2024-10-30)
@logfire.instrument()no longer needs source code by @alexmojaki in #543. BREAKING CHANGES caused by this:- Functions decorated with
@logfire.instrument()and functions nested within them can now be auto-traced unlike before. Use@logfire.no_auto_traceanywhere on functions you want to exclude, especially the instrumented function. - Decorated async generator functions won't support the
.asendmethod properly - the generator will only receiveNone. Butinstrumentshouldn't be used on generators anyway unless the generator is being used as a context manager, so new warnings about this have been added. See https://logfire.pydantic.dev/docs/guides/advanced/generators/#using-logfireinstrument
- Functions decorated with
v1.3.2 (2024-10-29)
- Handle NonRecordingSpans for fastapi arguments by @alexmojaki in #551
- Preserve docstrings in auto-tracing by @alexmojaki in #550
v1.3.1 (2024-10-28)
- Handle null fastapi route.name and route.operation_id by @alexmojaki in #547
v1.3.0 (2024-10-24)
- Add Code Source links by @Kludex in #451 and #505
- Add fastapi arguments attributes directly on the root OTel span, remove
use_opentelemetry_instrumentationkwarg by @alexmojaki in #509 - Allow setting tags on logfire spans by @AdolfoVillalobos in #497
- Add logger name to
LogfireLoggingHandlerspans by @samuelcolvin in #534 - Format
NoneasNoneinstead ofnullin messages by @alexmojaki in #525 - Use
PYTEST_VERSIONinstead ofPYTEST_CURRENT_TESTto detectlogfire.configure()being called within a pytest run but outside any test by @Kludex in #531
v1.2.0 (2024-10-17)
- Add
localparameter tologfire.configure()by @alexmojaki in #508
v1.1.0 (2024-10-14)
- Fix error in checking for generators in auto-tracing by @alexmojaki in pydantic#498
- Support
'if-token-present'for env var'LOGFIRE_SEND_TO_LOGFIRE'by @sydney-runkle in pydantic#488 - Use
Compression.Gzipby @Kludex in pydantic#491
v1.0.1 (2024-10-02)
- Fix warning about unregistered MetricReaders by @alexmojaki in pydantic#465
v1.0.0 (2024-09-30)
- Upgrade
DeprecationWarnings toUserWarnings by @alexmojaki in pydantic#458 - Update query client APIs by @dmontagu in pydantic#454
v0.55.0 (2024-09-27)
- Replace
pydantic_plugininlogfire.configure()withlogfire.instrument_pydantic()by @alexmojaki in pydantic#453 - Keep
METRICS_PREFERRED_TEMPORALITYprivate by @alexmojaki in pydantic#456 - Use
SeededRandomIdGeneratorby default to prevent interference fromrandom.seedby @alexmojaki in pydantic#457
v0.54.0 (2024-09-26)
- Changes in
logfire.configure():- Remove
show_summaryandfast_shutdownby @alexmojaki in pydantic#431 - Move
base_url,id_generator, andns_timestamp_generatorparameters intoadvanced: AdvancedOptionsby @alexmojaki in pydantic#432 - Add
metricsparameter by @alexmojaki in pydantic#444
- Remove
- Remove default
min_durationforinstall_auto_tracingby @alexmojaki in pydantic#446
v0.53.0 (2024-09-17)
- Tail sampling by @alexmojaki in pydantic#407
- Use OTEL scopes better, especially instead of tags by @alexmojaki in pydantic#420
- Deprecate
project_nameinlogfire.configure(), remove old kwargs from signature by @alexmojaki in pydantic#428 - Fix websocket span messages by @alexmojaki in pydantic#426
- Remove warning about attribute/variable name conflicts in f-string magic by @alexmojaki in pydantic#418
v0.52.0 (2024-09-05)
- Handle FastAPI update with SolvedDependencies by @alexmojaki in pydantic#415
- Add experimental client for the Logfire Query API by @dmontagu in pydantic#405
- Remove
default_span_processorparameter fromconfigureby @alexmojaki in pydantic#400 - Remove
custom_scope_suffixparameter ofLogfire.logby @alexmojaki in pydantic#399 - Add missing
service_versionfield to_LogfireConfigDataso that it gets copied into subprocesses by @alexmojaki in pydantic#401
v0.51.0 (2024-08-22)
- System metrics are no longer collected by default when the correct dependency is installed. Use
logfire.instrument_system_metrics()to enable system metrics collection. If you are simply using the old 'Basic System Metrics' dashboard, then no further code changes are required, but that dashboard will no longer work properly and you should create a new dashboard from the template named 'Basic System Metrics (Logfire)'. If you were using other collected metrics, see the documentation for how to collect those. By @alexmojaki in pydantic#373 - Stop collecting package versions by @alexmojaki in pydantic#387
- Don't auto-trace generators by @alexmojaki in pydantic#386
- Disable ASGI send/receive spans by default by @alexmojaki in pydantic#371
- Add py.typed file to logfire-api by @jackmpcollins in pydantic#379
- Check
LambdaRuntimeClientbefore logging tracebacks in_ensure_flush_after_aws_lambdaby @alexmojaki in pydantic#388
v0.50.1 (2024-08-06)
(Previously released as v0.50.0, then yanked due to pydantic#367)
- BREAKING CHANGES: Separate sending to Logfire from using standard OTEL environment variables by @alexmojaki in pydantic#351. See https://logfire.pydantic.dev/docs/guides/advanced/alternative_backends/ for details. Highlights:
OTEL_EXPORTER_OTLP_ENDPOINTis no longer just an alternative toLOGFIRE_BASE_URL. SettingOTEL_EXPORTER_OTLP_ENDPOINT,OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, and/orOTEL_EXPORTER_OTLP_METRICS_ENDPOINTwill set up appropriate exporters in addition to sending to Logfire, which must be turned off separately if desired. These are basic exporters relying on OTEL defaults. In particular they don't use our custom retrying logic.LOGFIRE_BASE_URL/logfire.configure(base_url=...)is now only intended for actual alternative Logfire backends, which are currently only available to Logfire developers, and unlikeOTEL_EXPORTER_OTLP_ENDPOINTrequires authenticating with Logfire.- Pending spans are only sent to logfire-specific exporters.
- Add
capture_statementto Redis instrumentation by @Kludex in pydantic#355
v0.49.1 (2024-08-05)
- Add missing return on instrument methods by @Kludex in pydantic#360
- Add
logfire.exception()tologfire-apiby @Kludex in pydantic#358 - Remove
TypeAliasfrom code source by @Kludex in pydantic#359 - Turn
ParamSpecnon-private by @Kludex in pydantic#361
v0.49.0 (2024-08-05)
- Add
logfire.instrument_mysql()by @aditkumar72 in pydantic#341 - Set OTEL status description when logging exceptions by @alexmojaki in pydantic#348
- Switch UpDownCounters to cumulative aggregation temporality by @alexmojaki in pydantic#347
- Log more info about internal errors by @alexmojaki in pydantic#346
v0.48.1 (2024-07-29)
- Handle newer opentelemetry versions by @alexmojaki in pydantic#337
- More lenient handling of loguru message mismatch and better warnings by @alexmojaki in pydantic#338
- Add better type hints for HTTPX and AsyncPG by @Kludex in pydantic#342
- Handle
setuptoolschangingsys.pathfor importingpackaging.versionby @alexmojaki in pydantic#344
v0.48.0 (2024-07-24)
- Add
instrument_celerymethod by @Kludex in pydantic#322 capture_headersby @alexmojaki in pydantic#318- Handle message formatting errors by @alexmojaki in pydantic#329
- Handle logging
Nonewithloguruby @alexmojaki in pydantic#331
v0.47.0 (2024-07-20)
- Fix recursive logging from OTEL's
BatchSpanProcessorby @alexmojaki in pydantic#306 - Set sqlalchemy 'connect' spans to debug level by @alexmojaki in pydantic#307
- Add type hints to instrument methods by @Kludex in pydantic#320
- Handle older versions of anthropic by @alexmojaki in pydantic#316
- Update dependencies, handle change in importlib by @alexmojaki in pydantic#323
- Summarize db.statement in message by @alexmojaki in pydantic#308
- Handle and test other OpenAI/Anthropic client methods by @alexmojaki in pydantic#312
v0.46.1 (2024-07-05)
- Fix release process for
logfire-apiby @Kludex in pydantic#303
v0.46.0 (2024-07-05)
- Add
logfire-apiby @Kludex in pydantic#268 - Use exponential histogram buckets by @alexmojaki in pydantic#282
- Add attribute noting details of scrubbed values by @alexmojaki in pydantic#278
- Ensure
force_flushat end of AWS Lambda invocation by @alexmojaki in pydantic#296
v0.45.1 (2024-07-01)
- Fix ignore no config warning message by @ba1mn in pydantic#292
- Ensure
StaticFilesdoesn't breakinstrument_fastapiby @alexmojaki in pydantic#294
v0.45.0 (2024-06-29)
- Add
scrubbing: ScrubbingOptions | Falseparameter tologfire.configure, replacingscrubbing_patternsandscrubbing_callbackby @alexmojaki in pydantic#283 - Fix and test unmapped SQLModels by @alexmojaki in pydantic#286
- Optimize
collect_package_infoby @alexmojaki in pydantic#285
v0.44.0 (2024-06-26)
- Prevent 'dictionary changed size during iteration' error in
install_auto_tracingby @alexmojaki in pydantic#277 suppress_instrumentationwhen retrying exports by @alexmojaki in pydantic#279- Log async stack in
log_slow_async_callbacksby @alexmojaki in pydantic#280
v0.43.0 (2024-06-24)
- BREAKING CHANGE: Remove default for
modulesparameter ofinstall_auto_tracingby @alexmojaki in pydantic#261 - BREAKING CHANGE: Check if logfire token is valid in separate thread, so
logfire.configurewon't block startup and will no longer raise an exception for an invalid token, by @alexmojaki in pydantic#274 - Remove
logfire_api_sessionparameter fromlogfire.configureby @alexmojaki in pydantic#272 - Default the log level to error if the status code is error, and vice versa by @alexmojaki in pydantic#269
- Avoid importing
gitpythonby @alexmojaki in pydantic#260 - Only delete files on
logfire cleanby @Kludex in pydantic#267 - Bug fix: Logging arguments of a request to a FastAPI sub app by @sneakyPad in pydantic#259
- Fix query params not being in message by @alexmojaki in pydantic#271
- Replace 'Redacted' with 'Scrubbed' in 'Redacted due to...' by @alexmojaki in pydantic#273
v0.42.0 (2024-06-11)
- Improved handling of request errors when exporting by @alexmojaki in pydantic#252
ignore_no_configsetting added topyproject.tomlby @deepakdinesh1123 in pydantic#254- Make
logfire whoamirespect theLOGFIRE_TOKENenv var by @alexmojaki in pydantic#256
v0.41.0 (2024-06-06)
- Fix backfill command by @alexmojaki in pydantic#243
- Update Anthropic to use tools that are no longer in beta by @willbakst in pydantic#249
- Anthropic instrumentation now requires
anthropic>=0.27.0
- Anthropic instrumentation now requires
v0.40.0 (2024-06-04)
- BREAKING CHANGE: The
processorsparameter oflogfire.configure()has been replaced byadditional_span_processors. Passingprocessorswill raise an error. Unlikeprocessors, settingadditional_span_processorsto an empty sequence will not disable the default span processor which exports to Logfire. To do that, passsend_to_logfire=False. Similarlymetric_readershas been replaced byadditional_metric_reader. By @alexmojaki in pydantic#233 - Improve error raised when opentelemetry.instrumentation.django is not installed by @deepakdinesh1123 in pydantic#231
- Handle internal errors by @alexmojaki in pydantic#232
v0.39.0 (2024-06-03)
Add new methods for easier integration in pydantic#207:
instrument_flaskinstrument_starletteinstrument_aiohttp_clientinstrument_sqlalchemyinstrument_pymongoinstrument_redis
v0.38.0 (2024-05-31)
BREAKING CHANGE: Calling logfire.info, logfire.error, logfire.span etc. will no longer automatically configure logfire if it hasn't been configured already. Instead it will emit a warning and not log anything.
Users must call logfire.configure() before they want logging to actually start, even if they don't pass any arguments to configure and all configuration is done by environment variables.
Using integrations like logfire.instrument_fastapi() before calling configure will also emit a warning but it will still set up the instrumentation, although it will not log anything until configure is called.
v0.37.0 (2024-05-29)
- Add
logfire.suppress_instrumentationcontext manager, silenceurllib3debug logs from exporting by @jlondonobo in pydantic#197
v0.36.1 (2024-05-27)
- Fix structlog import by @alexmojaki in pydantic#217
v0.36.0 (2024-05-27)
- Allow passing OTEL kwargs through instrument_fastapi by @alexmojaki in pydantic#205
- Retry connection errors by @alexmojaki in pydantic#214
v0.35.0 (2024-05-21)
- Add
logfire.instrument_requests()by @tlpinney in pydantic#196 - Add
logfire.instrument_httpx()by @tlpinney in pydantic#198 - Add
logfire.instrument_django()by @inspirsmith in pydantic#200
v0.34.0 (2024-05-21)
- Allow instrumenting OpenAI/Anthropic client classes or modules by @alexmojaki in pydantic#191
v0.33.0 (2024-05-18)
- Fix logging integrations with non-string messages by @alexmojaki in pydantic#179
- Anthropic instrumentation by @willbakst in pydantic#181
v0.32.1 (2024-05-15)
- Add 'executing' version to 'logfire info' output by @alexmojaki in pydantic#180
- Don't use
include_urlwith Pydantic's V1ValidationErrorby @Kludex in pydantic#184
v0.32.0 (2024-05-14)
- Don't scrub spans from OpenAI integration by @alexmojaki in pydantic#173
- Convert FastAPI arguments log to span, don't set to debug by default by @alexmojaki in pydantic#164
- Raise an exception when Pydantic plugin is enabled on Pydantic <2.5.0 by @bossenti in pydantic#160
- Do not require project name on
logfire projects usecommand by @Kludex in pydantic#177
v0.31.0 (2024-05-13)
- Improve error when
opentelemetry-instrumentation-fastapiis missing by @Kludex in pydantic#143 - Set
send_to_logfiretoFalsewhen running under Pytest by @Kludex in pydantic#154 - Add
logfire.metric_gauge()by @Kludex in pydantic#153 - Use
stack_infoinstead ofstack_offsetby @Kludex in pydantic#137 - Fix JSON encoding/schema of pydantic v1 models by @alexmojaki in pydantic#163
- Handle intermediate logging/loguru levels by @alexmojaki in pydantic#162
- Add exception on console by @Kludex in pydantic#168
- f-string magic by @alexmojaki in pydantic#151
v0.30.0 (2024-05-06)
- Close spans when process shuts down before the exporter shuts down and drops them by @alexmojaki in pydantic#108
- add
psycopgin OTEL_PACKAGES and optional-dependencies by @Elkiwa in pydantic#115 - [PYD-877] Log OpenAI streaming response at the end instead of opening a span and attaching context in a generator that may not finish by @alexmojaki in pydantic#107
- Increase minimum typing-extensions version by @Kludex in pydantic#129
- Add note about creating write tokens when user is not authenticated by @Kludex in pydantic#127
- Make pip install command printed by 'logfire inspect' easy to copy by @alexmojaki in pydantic#130
v0.29.0 (2024-05-03)
- Add log level on
on_startfor ASGI send and receive messages by @Kludex in pydantic#94 - Support a dataclass type as an argument by @dmontagu in pydantic#100
- Add min_log_level to console options by @Kludex in pydantic#95
- Improve the OpenAI integration by @Kludex in pydantic#104
v0.28.3 (2024-05-02)
- Fix pydantic plugin for cloudpickle by @alexmojaki in pydantic#86
- Handle unloaded SQLAlchemy fields in JSON schema by @alexmojaki in pydantic#92
v0.28.2 (2024-05-02)
- Fix OpenAI streaming empty chunk error by @hramezani in pydantic#69
- Update pyproject.toml to include logfire in sdist build target by @syniex in pydantic#51
- Recommend
opentelemetry-instrumentation-sklearnonscikit-learninstead ofsklearnby @Kludex in pydantic#75
v0.28.1 (2024-05-01)
- Don't scrub 'author' by @alexmojaki in pydantic#55
- Check if object is SQLAlchemy before dataclass by @Kludex in pydantic#67
v0.28.0 (2024-04-30)
- Add
logfire.instrument_asyncpg()by @alexmojaki in pydantic#44
v0.27.0 (2024-04-30)
First release from new repo!
- Update README by @Kludex in pydantic#2
- Add linter & pipeline by @Kludex in pydantic#1
- Use Python 3.8 for pipeline by @Kludex in pydantic#3
- Use Rye instead of Poetry by @Kludex in pydantic#5
- Add test suite by @Kludex in pydantic#6
- Add custom PyPI by @Kludex in pydantic#7
- Add release job by @Kludex in pydantic#8
- Install rye on release job by @Kludex in pydantic#9
- Add latest monorepo changes by @Kludex in pydantic#10
- Add Python 3.12 to CI by @hramezani in pydantic#11
- improve readme and related faff by @samuelcolvin in pydantic#12
- CF pages docs build by @samuelcolvin in pydantic#14
- Create alert docs by @Kludex in pydantic#15
- improve the readme and contributing guide by @samuelcolvin in pydantic#16
- Add classifiers by @hramezani in pydantic#17
- tell rye to use uv by @samuelcolvin in pydantic#19
- Adding docs for
instrument_openaiby @samuelcolvin in pydantic#18 - Live view docs by @samuelcolvin in pydantic#20
- Add
logfire infoand issue templates by @samuelcolvin in pydantic#22 - Add GitHub discussions to help page, remove "login", show source link by @samuelcolvin in pydantic#23
- setup coverage by @samuelcolvin in pydantic#24
- improve coverage by @samuelcolvin in pydantic#25
- Write token docs (#2244) by @Kludex in pydantic#27
- add direct connect docs by @davidhewitt in pydantic#26
- Add dashboard docs by @Kludex in pydantic#28
- Add SQL Explore docs by @Kludex in pydantic#29
- Make the
psycopg2docs runnable as is by @Kludex in pydantic#31 - Add Rye to installation by @Kludex in pydantic#33
- Apply Logfire brand colors by @Kludex in pydantic#32
logfire.instrument_psycopg()function by @alexmojaki in pydantic#30- Handle recursive logging from OTEL by @alexmojaki in pydantic#35
- Improve MongoDB docs by @Kludex in pydantic#34
- Improve colors by @dmontagu in pydantic#38
- Rename files to not have numeric prefixes by @dmontagu in pydantic#39
- Handle cyclic references in JSON encoding and schema by @alexmojaki in pydantic#37
- Ensure
logfire.testingdoesn't depend on pydantic and eval_type_backport by @alexmojaki in pydantic#40 - Allow using pydantic plugin with models defined before calling logfire.configure by @alexmojaki in pydantic#36