fastapi-observer 1.3.2__tar.gz → 1.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fastapi_observer-1.3.2/src/fastapi_observer.egg-info → fastapi_observer-1.4.1}/PKG-INFO +55 -52
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/README.md +21 -20
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/pyproject.toml +33 -36
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1/src/fastapi_observer.egg-info}/PKG-INFO +55 -52
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapi_observer.egg-info/SOURCES.txt +1 -0
- fastapi_observer-1.4.1/src/fastapi_observer.egg-info/requires.txt +61 -0
- fastapi_observer-1.4.1/src/fastapiobserver/_version.py +1 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/config.py +2 -8
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/fastapi.py +146 -92
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/logging/setup.py +72 -59
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/middleware/metrics.py +3 -2
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/middleware/request_logging.py +60 -37
- fastapi_observer-1.4.1/src/fastapiobserver/otel/exclusions.py +45 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/otel/lifecycle.py +16 -1
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/otel/settings.py +39 -91
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/security/policy.py +4 -14
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/security/redaction.py +3 -2
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/utils.py +12 -1
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_config_settings.py +2 -2
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_excluded_url_precedence.py +3 -2
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_fastapi_install.py +51 -4
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_fork_queue_listener.py +1 -2
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_graphql_integrations.py +5 -2
- fastapi_observer-1.4.1/tests/test_lifespan_teardown.py +109 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_metrics_contracts.py +1 -1
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_otel_lifecycle.py +26 -10
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_otel_logs_pipeline.py +2 -1
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_profiles.py +5 -5
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_security_audit_fixes.py +13 -0
- fastapi_observer-1.3.2/src/fastapi_observer.egg-info/requires.txt +0 -56
- fastapi_observer-1.3.2/src/fastapiobserver/_version.py +0 -1
- fastapi_observer-1.3.2/tests/test_lifespan_teardown.py +0 -53
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/LICENSE +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/setup.cfg +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapi_observer.egg-info/dependency_links.txt +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapi_observer.egg-info/top_level.txt +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/__init__.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/audit/__init__.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/audit/formatter.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/audit/providers.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/audit/verify.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/control_plane.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/db_tracing.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/integrations/__init__.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/integrations/strawberry.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/logging/__init__.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/logging/circuit_breaker.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/logging/filters.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/logging/formatter.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/logging/queueing.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/logging/state.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/loguru.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/metrics/__init__.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/metrics/builder.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/metrics/contracts.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/metrics/endpoint.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/metrics/noop.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/metrics/pathing.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/metrics/prometheus/__init__.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/metrics/prometheus/backend.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/metrics/prometheus/client.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/metrics/prometheus/collector.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/metrics/prometheus/exemplars.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/metrics/prometheus/multiprocess.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/metrics/registry.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/middleware/__init__.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/middleware/body_capture.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/middleware/context.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/middleware/events.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/middleware/headers.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/middleware/ip.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/middleware/span_errors.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/otel/__init__.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/otel/logs.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/otel/metrics.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/otel/resource.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/otel/tracing.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/otel/types.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/plugins.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/profiles.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/propagation.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/py.typed +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/request_context.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/security/__init__.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/security/normalize.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/security/proxies.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/sinks/__init__.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/sinks/builtin.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/sinks/discovery.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/sinks/factory.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/sinks/logtail/__init__.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/sinks/logtail/dlq.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/sinks/logtail/handler.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/sinks/logtail/sink.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/sinks/protocol.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/sinks/registry.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/src/fastapiobserver/sinks/stats.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_audit_chain.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_body_media_allowlist.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_db_tracing.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_dx_parity.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_log_queue_controls.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_logging_schema_contract.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_logtail_dlq.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_loguru_bridge.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_metrics_optional_dependency.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_middleware.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_negotiate_content_type.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_otel_integration.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_otel_log_correlation.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_otel_logs_from_env.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_otel_metrics_from_env.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_otlp_export_integration.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_plugin_isolation.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_propagation.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_redaction_presets.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_route_template_cardinality.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_runtime_control_auth.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_security_redaction.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_sink_circuit_breaker.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_sinks.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_trust_boundary.py +0 -0
- {fastapi_observer-1.3.2 → fastapi_observer-1.4.1}/tests/test_utils_refactors.py +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastapi-observer
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.1
|
|
4
4
|
Summary: Zero-glue FastAPI observability with security presets and runtime controls
|
|
5
5
|
Author-email: Vitaee <opensource@vitaee.dev>
|
|
6
6
|
License-Expression: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/Vitaee/FastapiObserver
|
|
8
|
-
Project-URL: Documentation, https://github.
|
|
8
|
+
Project-URL: Documentation, https://vitaee.github.io/FastapiObserver/
|
|
9
9
|
Project-URL: Repository, https://github.com/Vitaee/FastapiObserver.git
|
|
10
10
|
Project-URL: Issues, https://github.com/Vitaee/FastapiObserver/issues
|
|
11
11
|
Project-URL: Funding, https://buymeacoffee.com/FYbPCSu
|
|
@@ -19,16 +19,17 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.13
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
22
23
|
Classifier: Framework :: FastAPI
|
|
23
24
|
Classifier: Topic :: System :: Logging
|
|
24
25
|
Classifier: Topic :: System :: Monitoring
|
|
25
26
|
Classifier: Typing :: Typed
|
|
26
|
-
Requires-Python: <3.
|
|
27
|
+
Requires-Python: <3.16,>=3.10
|
|
27
28
|
Description-Content-Type: text/markdown
|
|
28
29
|
License-File: LICENSE
|
|
29
|
-
Requires-Dist: fastapi>=0.
|
|
30
|
+
Requires-Dist: fastapi>=0.133.0
|
|
30
31
|
Requires-Dist: pydantic-settings>=2.10.1
|
|
31
|
-
Requires-Dist: starlette>=
|
|
32
|
+
Requires-Dist: starlette>=1.3.1
|
|
32
33
|
Provides-Extra: fast-json
|
|
33
34
|
Requires-Dist: orjson>=3.11.7; extra == "fast-json"
|
|
34
35
|
Provides-Extra: prometheus
|
|
@@ -36,42 +37,43 @@ Requires-Dist: prometheus-client>=0.24.1; extra == "prometheus"
|
|
|
36
37
|
Provides-Extra: loguru
|
|
37
38
|
Requires-Dist: loguru>=0.7.2; extra == "loguru"
|
|
38
39
|
Provides-Extra: otel
|
|
39
|
-
Requires-Dist: opentelemetry-api>=1.
|
|
40
|
-
Requires-Dist: opentelemetry-sdk>=1.
|
|
41
|
-
Requires-Dist: opentelemetry-exporter-otlp>=1.
|
|
42
|
-
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.
|
|
43
|
-
Requires-Dist: opentelemetry-instrumentation-logging>=0.
|
|
40
|
+
Requires-Dist: opentelemetry-api>=1.45.1; extra == "otel"
|
|
41
|
+
Requires-Dist: opentelemetry-sdk>=1.45.1; extra == "otel"
|
|
42
|
+
Requires-Dist: opentelemetry-exporter-otlp>=1.45.1; extra == "otel"
|
|
43
|
+
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.66b1; extra == "otel"
|
|
44
|
+
Requires-Dist: opentelemetry-instrumentation-logging>=0.66b1; extra == "otel"
|
|
44
45
|
Provides-Extra: otel-httpx
|
|
45
|
-
Requires-Dist: opentelemetry-instrumentation-httpx>=0.
|
|
46
|
+
Requires-Dist: opentelemetry-instrumentation-httpx>=0.66b1; extra == "otel-httpx"
|
|
46
47
|
Provides-Extra: otel-requests
|
|
47
|
-
Requires-Dist: opentelemetry-instrumentation-requests>=0.
|
|
48
|
+
Requires-Dist: opentelemetry-instrumentation-requests>=0.66b1; extra == "otel-requests"
|
|
48
49
|
Provides-Extra: audit
|
|
49
|
-
Requires-Dist: cryptography>=
|
|
50
|
+
Requires-Dist: cryptography>=50.0.0; extra == "audit"
|
|
50
51
|
Provides-Extra: otel-sqlalchemy
|
|
51
|
-
Requires-Dist: opentelemetry-instrumentation-sqlalchemy>=0.
|
|
52
|
+
Requires-Dist: opentelemetry-instrumentation-sqlalchemy>=0.66b1; extra == "otel-sqlalchemy"
|
|
52
53
|
Provides-Extra: all
|
|
53
54
|
Requires-Dist: orjson>=3.11.7; extra == "all"
|
|
54
55
|
Requires-Dist: prometheus-client>=0.24.1; extra == "all"
|
|
55
56
|
Requires-Dist: loguru>=0.7.2; extra == "all"
|
|
56
|
-
Requires-Dist: opentelemetry-api>=1.
|
|
57
|
-
Requires-Dist: opentelemetry-sdk>=1.
|
|
58
|
-
Requires-Dist: opentelemetry-exporter-otlp>=1.
|
|
59
|
-
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.
|
|
60
|
-
Requires-Dist: opentelemetry-instrumentation-logging>=0.
|
|
61
|
-
Requires-Dist: opentelemetry-instrumentation-httpx>=0.
|
|
62
|
-
Requires-Dist: opentelemetry-instrumentation-requests>=0.
|
|
63
|
-
Requires-Dist: opentelemetry-instrumentation-sqlalchemy>=0.
|
|
64
|
-
Requires-Dist: cryptography>=
|
|
57
|
+
Requires-Dist: opentelemetry-api>=1.45.1; extra == "all"
|
|
58
|
+
Requires-Dist: opentelemetry-sdk>=1.45.1; extra == "all"
|
|
59
|
+
Requires-Dist: opentelemetry-exporter-otlp>=1.45.1; extra == "all"
|
|
60
|
+
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.66b1; extra == "all"
|
|
61
|
+
Requires-Dist: opentelemetry-instrumentation-logging>=0.66b1; extra == "all"
|
|
62
|
+
Requires-Dist: opentelemetry-instrumentation-httpx>=0.66b1; extra == "all"
|
|
63
|
+
Requires-Dist: opentelemetry-instrumentation-requests>=0.66b1; extra == "all"
|
|
64
|
+
Requires-Dist: opentelemetry-instrumentation-sqlalchemy>=0.66b1; extra == "all"
|
|
65
|
+
Requires-Dist: cryptography>=50.0.0; extra == "all"
|
|
65
66
|
Provides-Extra: dev
|
|
66
|
-
Requires-Dist: httpx>=0.28.1; extra == "dev"
|
|
67
|
-
Requires-Dist:
|
|
68
|
-
Requires-Dist:
|
|
69
|
-
Requires-Dist:
|
|
70
|
-
Requires-Dist:
|
|
71
|
-
Requires-Dist: pytest
|
|
72
|
-
Requires-Dist:
|
|
73
|
-
Requires-Dist:
|
|
74
|
-
Requires-Dist:
|
|
67
|
+
Requires-Dist: httpx>=0.28.1; python_version < "3.11" and extra == "dev"
|
|
68
|
+
Requires-Dist: httpx2>=2.16.0; python_version >= "3.11" and extra == "dev"
|
|
69
|
+
Requires-Dist: loguru>=0.7.3; extra == "dev"
|
|
70
|
+
Requires-Dist: mypy>=2.4.1; extra == "dev"
|
|
71
|
+
Requires-Dist: pip-audit>=2.10.1; extra == "dev"
|
|
72
|
+
Requires-Dist: pytest>=9.2.0; extra == "dev"
|
|
73
|
+
Requires-Dist: pytest-randomly>=5.0.0; extra == "dev"
|
|
74
|
+
Requires-Dist: ruff>=0.17.3; extra == "dev"
|
|
75
|
+
Requires-Dist: cyclonedx-bom>=7.6.0; extra == "dev"
|
|
76
|
+
Requires-Dist: uvicorn>=0.54.0; extra == "dev"
|
|
75
77
|
Dynamic: license-file
|
|
76
78
|
|
|
77
79
|
# fastapi-observer
|
|
@@ -83,7 +85,9 @@ Dynamic: license-file
|
|
|
83
85
|
|
|
84
86
|
`fastapi-observer` gives you structured JSON logs, request correlation, Prometheus metrics, OpenTelemetry tracing, security redaction presets, and runtime controls in one install step and one function call.
|
|
85
87
|
|
|
86
|
-
**
|
|
88
|
+
**Documentation:** [vitaee.github.io/FastapiObserver](https://vitaee.github.io/FastapiObserver/)
|
|
89
|
+
|
|
90
|
+
**Supported Python versions:** `3.10` to `3.15`
|
|
87
91
|
|
|
88
92
|
---
|
|
89
93
|
|
|
@@ -92,12 +96,12 @@ Dynamic: license-file
|
|
|
92
96
|
|
|
93
97
|
| Component | Supported / Tested |
|
|
94
98
|
|---|---|
|
|
95
|
-
| Python | `3.10` to `3.
|
|
96
|
-
| FastAPI | `>=0.
|
|
97
|
-
| Starlette | `>=
|
|
99
|
+
| Python | `3.10` to `3.15` (CI matrix) |
|
|
100
|
+
| FastAPI | `>=0.133.0` |
|
|
101
|
+
| Starlette | `>=1.3.1` |
|
|
98
102
|
| pydantic-settings | `>=2.10.1` |
|
|
99
103
|
| Prometheus backend | `prometheus-client>=0.24.1` (optional extra) |
|
|
100
|
-
| OpenTelemetry | `opentelemetry-api/sdk/exporter>=1.
|
|
104
|
+
| OpenTelemetry | `opentelemetry-api/sdk/exporter>=1.45.1` (optional extra) |
|
|
101
105
|
| Loguru bridge | `loguru>=0.7.2` (optional extra) |
|
|
102
106
|
|
|
103
107
|
---
|
|
@@ -172,8 +176,6 @@ import fastapiobserver
|
|
|
172
176
|
|
|
173
177
|
---
|
|
174
178
|
|
|
175
|
-
## 5-Minute Quick Start
|
|
176
|
-
|
|
177
179
|
## 5-Minute Quick Start ("Zero-Glue")
|
|
178
180
|
|
|
179
181
|
You can configure the entire library via environment variables simply by calling `install_observability(app)`.
|
|
@@ -233,16 +235,17 @@ To dramatically reduce boilerplate, you can use the `OBS_PROFILE` environment va
|
|
|
233
235
|
|
|
234
236
|
## Documentation Map
|
|
235
237
|
|
|
236
|
-
|
|
237
|
-
- [Security & Presets](security
|
|
238
|
-
- [Environment Variables](configuration
|
|
239
|
-
- [Runtime Control](runtime-control
|
|
240
|
-
- [OpenTelemetry](opentelemetry
|
|
241
|
-
- [Logtail Sink](logtail-sink
|
|
242
|
-
- [Audit Logging](audit-logging
|
|
243
|
-
- [Database Tracing](db-tracing
|
|
244
|
-
- [GraphQL Support](graphql
|
|
245
|
-
- [Architecture & Operations](architecture
|
|
246
|
-
- [Production Deployment](deployment
|
|
247
|
-
- [Performance Tuning](tuning
|
|
248
|
-
- [Advanced Operations](advanced
|
|
238
|
+
Full documentation lives at [vitaee.github.io/FastapiObserver](https://vitaee.github.io/FastapiObserver/). Deep dives:
|
|
239
|
+
- [Security & Presets](https://vitaee.github.io/FastapiObserver/security/)
|
|
240
|
+
- [Environment Variables](https://vitaee.github.io/FastapiObserver/configuration/)
|
|
241
|
+
- [Runtime Control](https://vitaee.github.io/FastapiObserver/runtime-control/)
|
|
242
|
+
- [OpenTelemetry](https://vitaee.github.io/FastapiObserver/opentelemetry/)
|
|
243
|
+
- [Logtail Sink](https://vitaee.github.io/FastapiObserver/logtail-sink/)
|
|
244
|
+
- [Audit Logging](https://vitaee.github.io/FastapiObserver/audit-logging/)
|
|
245
|
+
- [Database Tracing](https://vitaee.github.io/FastapiObserver/db-tracing/)
|
|
246
|
+
- [GraphQL Support](https://vitaee.github.io/FastapiObserver/graphql/)
|
|
247
|
+
- [Architecture & Operations](https://vitaee.github.io/FastapiObserver/architecture/)
|
|
248
|
+
- [Production Deployment](https://vitaee.github.io/FastapiObserver/deployment/)
|
|
249
|
+
- [Performance Tuning](https://vitaee.github.io/FastapiObserver/tuning/)
|
|
250
|
+
- [Advanced Operations](https://vitaee.github.io/FastapiObserver/advanced/)
|
|
251
|
+
- [Maintenance & Contributing](https://vitaee.github.io/FastapiObserver/contributing/) (quality gates, release flow, runtime stress harness)
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
`fastapi-observer` gives you structured JSON logs, request correlation, Prometheus metrics, OpenTelemetry tracing, security redaction presets, and runtime controls in one install step and one function call.
|
|
9
9
|
|
|
10
|
-
**
|
|
10
|
+
**Documentation:** [vitaee.github.io/FastapiObserver](https://vitaee.github.io/FastapiObserver/)
|
|
11
|
+
|
|
12
|
+
**Supported Python versions:** `3.10` to `3.15`
|
|
11
13
|
|
|
12
14
|
---
|
|
13
15
|
|
|
@@ -16,12 +18,12 @@
|
|
|
16
18
|
|
|
17
19
|
| Component | Supported / Tested |
|
|
18
20
|
|---|---|
|
|
19
|
-
| Python | `3.10` to `3.
|
|
20
|
-
| FastAPI | `>=0.
|
|
21
|
-
| Starlette | `>=
|
|
21
|
+
| Python | `3.10` to `3.15` (CI matrix) |
|
|
22
|
+
| FastAPI | `>=0.133.0` |
|
|
23
|
+
| Starlette | `>=1.3.1` |
|
|
22
24
|
| pydantic-settings | `>=2.10.1` |
|
|
23
25
|
| Prometheus backend | `prometheus-client>=0.24.1` (optional extra) |
|
|
24
|
-
| OpenTelemetry | `opentelemetry-api/sdk/exporter>=1.
|
|
26
|
+
| OpenTelemetry | `opentelemetry-api/sdk/exporter>=1.45.1` (optional extra) |
|
|
25
27
|
| Loguru bridge | `loguru>=0.7.2` (optional extra) |
|
|
26
28
|
|
|
27
29
|
---
|
|
@@ -96,8 +98,6 @@ import fastapiobserver
|
|
|
96
98
|
|
|
97
99
|
---
|
|
98
100
|
|
|
99
|
-
## 5-Minute Quick Start
|
|
100
|
-
|
|
101
101
|
## 5-Minute Quick Start ("Zero-Glue")
|
|
102
102
|
|
|
103
103
|
You can configure the entire library via environment variables simply by calling `install_observability(app)`.
|
|
@@ -157,16 +157,17 @@ To dramatically reduce boilerplate, you can use the `OBS_PROFILE` environment va
|
|
|
157
157
|
|
|
158
158
|
## Documentation Map
|
|
159
159
|
|
|
160
|
-
|
|
161
|
-
- [Security & Presets](security
|
|
162
|
-
- [Environment Variables](configuration
|
|
163
|
-
- [Runtime Control](runtime-control
|
|
164
|
-
- [OpenTelemetry](opentelemetry
|
|
165
|
-
- [Logtail Sink](logtail-sink
|
|
166
|
-
- [Audit Logging](audit-logging
|
|
167
|
-
- [Database Tracing](db-tracing
|
|
168
|
-
- [GraphQL Support](graphql
|
|
169
|
-
- [Architecture & Operations](architecture
|
|
170
|
-
- [Production Deployment](deployment
|
|
171
|
-
- [Performance Tuning](tuning
|
|
172
|
-
- [Advanced Operations](advanced
|
|
160
|
+
Full documentation lives at [vitaee.github.io/FastapiObserver](https://vitaee.github.io/FastapiObserver/). Deep dives:
|
|
161
|
+
- [Security & Presets](https://vitaee.github.io/FastapiObserver/security/)
|
|
162
|
+
- [Environment Variables](https://vitaee.github.io/FastapiObserver/configuration/)
|
|
163
|
+
- [Runtime Control](https://vitaee.github.io/FastapiObserver/runtime-control/)
|
|
164
|
+
- [OpenTelemetry](https://vitaee.github.io/FastapiObserver/opentelemetry/)
|
|
165
|
+
- [Logtail Sink](https://vitaee.github.io/FastapiObserver/logtail-sink/)
|
|
166
|
+
- [Audit Logging](https://vitaee.github.io/FastapiObserver/audit-logging/)
|
|
167
|
+
- [Database Tracing](https://vitaee.github.io/FastapiObserver/db-tracing/)
|
|
168
|
+
- [GraphQL Support](https://vitaee.github.io/FastapiObserver/graphql/)
|
|
169
|
+
- [Architecture & Operations](https://vitaee.github.io/FastapiObserver/architecture/)
|
|
170
|
+
- [Production Deployment](https://vitaee.github.io/FastapiObserver/deployment/)
|
|
171
|
+
- [Performance Tuning](https://vitaee.github.io/FastapiObserver/tuning/)
|
|
172
|
+
- [Advanced Operations](https://vitaee.github.io/FastapiObserver/advanced/)
|
|
173
|
+
- [Maintenance & Contributing](https://vitaee.github.io/FastapiObserver/contributing/) (quality gates, release flow, runtime stress harness)
|
|
@@ -7,7 +7,7 @@ name = "fastapi-observer"
|
|
|
7
7
|
dynamic = ["version"]
|
|
8
8
|
description = "Zero-glue FastAPI observability with security presets and runtime controls"
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.10,<3.
|
|
10
|
+
requires-python = ">=3.10,<3.16"
|
|
11
11
|
authors = [
|
|
12
12
|
{ name = "Vitaee", email = "opensource@vitaee.dev" },
|
|
13
13
|
]
|
|
@@ -21,6 +21,7 @@ classifiers = [
|
|
|
21
21
|
"Programming Language :: Python :: 3.12",
|
|
22
22
|
"Programming Language :: Python :: 3.13",
|
|
23
23
|
"Programming Language :: Python :: 3.14",
|
|
24
|
+
"Programming Language :: Python :: 3.15",
|
|
24
25
|
"Framework :: FastAPI",
|
|
25
26
|
"Topic :: System :: Logging",
|
|
26
27
|
"Topic :: System :: Monitoring",
|
|
@@ -30,14 +31,14 @@ keywords = ["fastapi", "observability", "logging", "metrics", "opentelemetry"]
|
|
|
30
31
|
license = "MIT"
|
|
31
32
|
license-files = ["LICENSE"]
|
|
32
33
|
dependencies = [
|
|
33
|
-
"fastapi>=0.
|
|
34
|
+
"fastapi>=0.133.0",
|
|
34
35
|
"pydantic-settings>=2.10.1",
|
|
35
|
-
"starlette>=
|
|
36
|
+
"starlette>=1.3.1",
|
|
36
37
|
]
|
|
37
38
|
|
|
38
39
|
[project.urls]
|
|
39
40
|
Homepage = "https://github.com/Vitaee/FastapiObserver"
|
|
40
|
-
Documentation = "https://github.
|
|
41
|
+
Documentation = "https://vitaee.github.io/FastapiObserver/"
|
|
41
42
|
Repository = "https://github.com/Vitaee/FastapiObserver.git"
|
|
42
43
|
Issues = "https://github.com/Vitaee/FastapiObserver/issues"
|
|
43
44
|
Funding = "https://buymeacoffee.com/FYbPCSu"
|
|
@@ -53,48 +54,49 @@ loguru = [
|
|
|
53
54
|
"loguru>=0.7.2",
|
|
54
55
|
]
|
|
55
56
|
otel = [
|
|
56
|
-
"opentelemetry-api>=1.
|
|
57
|
-
"opentelemetry-sdk>=1.
|
|
58
|
-
"opentelemetry-exporter-otlp>=1.
|
|
59
|
-
"opentelemetry-instrumentation-fastapi>=0.
|
|
60
|
-
"opentelemetry-instrumentation-logging>=0.
|
|
57
|
+
"opentelemetry-api>=1.45.1",
|
|
58
|
+
"opentelemetry-sdk>=1.45.1",
|
|
59
|
+
"opentelemetry-exporter-otlp>=1.45.1",
|
|
60
|
+
"opentelemetry-instrumentation-fastapi>=0.66b1",
|
|
61
|
+
"opentelemetry-instrumentation-logging>=0.66b1",
|
|
61
62
|
]
|
|
62
63
|
otel-httpx = [
|
|
63
|
-
"opentelemetry-instrumentation-httpx>=0.
|
|
64
|
+
"opentelemetry-instrumentation-httpx>=0.66b1",
|
|
64
65
|
]
|
|
65
66
|
otel-requests = [
|
|
66
|
-
"opentelemetry-instrumentation-requests>=0.
|
|
67
|
+
"opentelemetry-instrumentation-requests>=0.66b1",
|
|
67
68
|
]
|
|
68
69
|
audit = [
|
|
69
|
-
"cryptography>=
|
|
70
|
+
"cryptography>=50.0.0",
|
|
70
71
|
]
|
|
71
72
|
otel-sqlalchemy = [
|
|
72
|
-
"opentelemetry-instrumentation-sqlalchemy>=0.
|
|
73
|
+
"opentelemetry-instrumentation-sqlalchemy>=0.66b1",
|
|
73
74
|
]
|
|
74
75
|
all = [
|
|
75
76
|
"orjson>=3.11.7",
|
|
76
77
|
"prometheus-client>=0.24.1",
|
|
77
78
|
"loguru>=0.7.2",
|
|
78
|
-
"opentelemetry-api>=1.
|
|
79
|
-
"opentelemetry-sdk>=1.
|
|
80
|
-
"opentelemetry-exporter-otlp>=1.
|
|
81
|
-
"opentelemetry-instrumentation-fastapi>=0.
|
|
82
|
-
"opentelemetry-instrumentation-logging>=0.
|
|
83
|
-
"opentelemetry-instrumentation-httpx>=0.
|
|
84
|
-
"opentelemetry-instrumentation-requests>=0.
|
|
85
|
-
"opentelemetry-instrumentation-sqlalchemy>=0.
|
|
86
|
-
"cryptography>=
|
|
79
|
+
"opentelemetry-api>=1.45.1",
|
|
80
|
+
"opentelemetry-sdk>=1.45.1",
|
|
81
|
+
"opentelemetry-exporter-otlp>=1.45.1",
|
|
82
|
+
"opentelemetry-instrumentation-fastapi>=0.66b1",
|
|
83
|
+
"opentelemetry-instrumentation-logging>=0.66b1",
|
|
84
|
+
"opentelemetry-instrumentation-httpx>=0.66b1",
|
|
85
|
+
"opentelemetry-instrumentation-requests>=0.66b1",
|
|
86
|
+
"opentelemetry-instrumentation-sqlalchemy>=0.66b1",
|
|
87
|
+
"cryptography>=50.0.0",
|
|
87
88
|
]
|
|
88
89
|
dev = [
|
|
89
|
-
"httpx>=0.28.1",
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"pytest
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
90
|
+
"httpx>=0.28.1; python_version < '3.11'",
|
|
91
|
+
"httpx2>=2.16.0; python_version >= '3.11'",
|
|
92
|
+
"loguru>=0.7.3",
|
|
93
|
+
"mypy>=2.4.1",
|
|
94
|
+
"pip-audit>=2.10.1",
|
|
95
|
+
"pytest>=9.2.0",
|
|
96
|
+
"pytest-randomly>=5.0.0",
|
|
97
|
+
"ruff>=0.17.3",
|
|
98
|
+
"cyclonedx-bom>=7.6.0",
|
|
99
|
+
"uvicorn>=0.54.0",
|
|
98
100
|
]
|
|
99
101
|
|
|
100
102
|
[tool.setuptools]
|
|
@@ -124,8 +126,3 @@ ignore_missing_imports = true
|
|
|
124
126
|
[tool.pytest.ini_options]
|
|
125
127
|
pythonpath = ["src"]
|
|
126
128
|
testpaths = ["tests"]
|
|
127
|
-
|
|
128
|
-
[dependency-groups]
|
|
129
|
-
dev = [
|
|
130
|
-
"mkdocs-material>=9.7.3",
|
|
131
|
-
]
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastapi-observer
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.1
|
|
4
4
|
Summary: Zero-glue FastAPI observability with security presets and runtime controls
|
|
5
5
|
Author-email: Vitaee <opensource@vitaee.dev>
|
|
6
6
|
License-Expression: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/Vitaee/FastapiObserver
|
|
8
|
-
Project-URL: Documentation, https://github.
|
|
8
|
+
Project-URL: Documentation, https://vitaee.github.io/FastapiObserver/
|
|
9
9
|
Project-URL: Repository, https://github.com/Vitaee/FastapiObserver.git
|
|
10
10
|
Project-URL: Issues, https://github.com/Vitaee/FastapiObserver/issues
|
|
11
11
|
Project-URL: Funding, https://buymeacoffee.com/FYbPCSu
|
|
@@ -19,16 +19,17 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.13
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
22
23
|
Classifier: Framework :: FastAPI
|
|
23
24
|
Classifier: Topic :: System :: Logging
|
|
24
25
|
Classifier: Topic :: System :: Monitoring
|
|
25
26
|
Classifier: Typing :: Typed
|
|
26
|
-
Requires-Python: <3.
|
|
27
|
+
Requires-Python: <3.16,>=3.10
|
|
27
28
|
Description-Content-Type: text/markdown
|
|
28
29
|
License-File: LICENSE
|
|
29
|
-
Requires-Dist: fastapi>=0.
|
|
30
|
+
Requires-Dist: fastapi>=0.133.0
|
|
30
31
|
Requires-Dist: pydantic-settings>=2.10.1
|
|
31
|
-
Requires-Dist: starlette>=
|
|
32
|
+
Requires-Dist: starlette>=1.3.1
|
|
32
33
|
Provides-Extra: fast-json
|
|
33
34
|
Requires-Dist: orjson>=3.11.7; extra == "fast-json"
|
|
34
35
|
Provides-Extra: prometheus
|
|
@@ -36,42 +37,43 @@ Requires-Dist: prometheus-client>=0.24.1; extra == "prometheus"
|
|
|
36
37
|
Provides-Extra: loguru
|
|
37
38
|
Requires-Dist: loguru>=0.7.2; extra == "loguru"
|
|
38
39
|
Provides-Extra: otel
|
|
39
|
-
Requires-Dist: opentelemetry-api>=1.
|
|
40
|
-
Requires-Dist: opentelemetry-sdk>=1.
|
|
41
|
-
Requires-Dist: opentelemetry-exporter-otlp>=1.
|
|
42
|
-
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.
|
|
43
|
-
Requires-Dist: opentelemetry-instrumentation-logging>=0.
|
|
40
|
+
Requires-Dist: opentelemetry-api>=1.45.1; extra == "otel"
|
|
41
|
+
Requires-Dist: opentelemetry-sdk>=1.45.1; extra == "otel"
|
|
42
|
+
Requires-Dist: opentelemetry-exporter-otlp>=1.45.1; extra == "otel"
|
|
43
|
+
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.66b1; extra == "otel"
|
|
44
|
+
Requires-Dist: opentelemetry-instrumentation-logging>=0.66b1; extra == "otel"
|
|
44
45
|
Provides-Extra: otel-httpx
|
|
45
|
-
Requires-Dist: opentelemetry-instrumentation-httpx>=0.
|
|
46
|
+
Requires-Dist: opentelemetry-instrumentation-httpx>=0.66b1; extra == "otel-httpx"
|
|
46
47
|
Provides-Extra: otel-requests
|
|
47
|
-
Requires-Dist: opentelemetry-instrumentation-requests>=0.
|
|
48
|
+
Requires-Dist: opentelemetry-instrumentation-requests>=0.66b1; extra == "otel-requests"
|
|
48
49
|
Provides-Extra: audit
|
|
49
|
-
Requires-Dist: cryptography>=
|
|
50
|
+
Requires-Dist: cryptography>=50.0.0; extra == "audit"
|
|
50
51
|
Provides-Extra: otel-sqlalchemy
|
|
51
|
-
Requires-Dist: opentelemetry-instrumentation-sqlalchemy>=0.
|
|
52
|
+
Requires-Dist: opentelemetry-instrumentation-sqlalchemy>=0.66b1; extra == "otel-sqlalchemy"
|
|
52
53
|
Provides-Extra: all
|
|
53
54
|
Requires-Dist: orjson>=3.11.7; extra == "all"
|
|
54
55
|
Requires-Dist: prometheus-client>=0.24.1; extra == "all"
|
|
55
56
|
Requires-Dist: loguru>=0.7.2; extra == "all"
|
|
56
|
-
Requires-Dist: opentelemetry-api>=1.
|
|
57
|
-
Requires-Dist: opentelemetry-sdk>=1.
|
|
58
|
-
Requires-Dist: opentelemetry-exporter-otlp>=1.
|
|
59
|
-
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.
|
|
60
|
-
Requires-Dist: opentelemetry-instrumentation-logging>=0.
|
|
61
|
-
Requires-Dist: opentelemetry-instrumentation-httpx>=0.
|
|
62
|
-
Requires-Dist: opentelemetry-instrumentation-requests>=0.
|
|
63
|
-
Requires-Dist: opentelemetry-instrumentation-sqlalchemy>=0.
|
|
64
|
-
Requires-Dist: cryptography>=
|
|
57
|
+
Requires-Dist: opentelemetry-api>=1.45.1; extra == "all"
|
|
58
|
+
Requires-Dist: opentelemetry-sdk>=1.45.1; extra == "all"
|
|
59
|
+
Requires-Dist: opentelemetry-exporter-otlp>=1.45.1; extra == "all"
|
|
60
|
+
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.66b1; extra == "all"
|
|
61
|
+
Requires-Dist: opentelemetry-instrumentation-logging>=0.66b1; extra == "all"
|
|
62
|
+
Requires-Dist: opentelemetry-instrumentation-httpx>=0.66b1; extra == "all"
|
|
63
|
+
Requires-Dist: opentelemetry-instrumentation-requests>=0.66b1; extra == "all"
|
|
64
|
+
Requires-Dist: opentelemetry-instrumentation-sqlalchemy>=0.66b1; extra == "all"
|
|
65
|
+
Requires-Dist: cryptography>=50.0.0; extra == "all"
|
|
65
66
|
Provides-Extra: dev
|
|
66
|
-
Requires-Dist: httpx>=0.28.1; extra == "dev"
|
|
67
|
-
Requires-Dist:
|
|
68
|
-
Requires-Dist:
|
|
69
|
-
Requires-Dist:
|
|
70
|
-
Requires-Dist:
|
|
71
|
-
Requires-Dist: pytest
|
|
72
|
-
Requires-Dist:
|
|
73
|
-
Requires-Dist:
|
|
74
|
-
Requires-Dist:
|
|
67
|
+
Requires-Dist: httpx>=0.28.1; python_version < "3.11" and extra == "dev"
|
|
68
|
+
Requires-Dist: httpx2>=2.16.0; python_version >= "3.11" and extra == "dev"
|
|
69
|
+
Requires-Dist: loguru>=0.7.3; extra == "dev"
|
|
70
|
+
Requires-Dist: mypy>=2.4.1; extra == "dev"
|
|
71
|
+
Requires-Dist: pip-audit>=2.10.1; extra == "dev"
|
|
72
|
+
Requires-Dist: pytest>=9.2.0; extra == "dev"
|
|
73
|
+
Requires-Dist: pytest-randomly>=5.0.0; extra == "dev"
|
|
74
|
+
Requires-Dist: ruff>=0.17.3; extra == "dev"
|
|
75
|
+
Requires-Dist: cyclonedx-bom>=7.6.0; extra == "dev"
|
|
76
|
+
Requires-Dist: uvicorn>=0.54.0; extra == "dev"
|
|
75
77
|
Dynamic: license-file
|
|
76
78
|
|
|
77
79
|
# fastapi-observer
|
|
@@ -83,7 +85,9 @@ Dynamic: license-file
|
|
|
83
85
|
|
|
84
86
|
`fastapi-observer` gives you structured JSON logs, request correlation, Prometheus metrics, OpenTelemetry tracing, security redaction presets, and runtime controls in one install step and one function call.
|
|
85
87
|
|
|
86
|
-
**
|
|
88
|
+
**Documentation:** [vitaee.github.io/FastapiObserver](https://vitaee.github.io/FastapiObserver/)
|
|
89
|
+
|
|
90
|
+
**Supported Python versions:** `3.10` to `3.15`
|
|
87
91
|
|
|
88
92
|
---
|
|
89
93
|
|
|
@@ -92,12 +96,12 @@ Dynamic: license-file
|
|
|
92
96
|
|
|
93
97
|
| Component | Supported / Tested |
|
|
94
98
|
|---|---|
|
|
95
|
-
| Python | `3.10` to `3.
|
|
96
|
-
| FastAPI | `>=0.
|
|
97
|
-
| Starlette | `>=
|
|
99
|
+
| Python | `3.10` to `3.15` (CI matrix) |
|
|
100
|
+
| FastAPI | `>=0.133.0` |
|
|
101
|
+
| Starlette | `>=1.3.1` |
|
|
98
102
|
| pydantic-settings | `>=2.10.1` |
|
|
99
103
|
| Prometheus backend | `prometheus-client>=0.24.1` (optional extra) |
|
|
100
|
-
| OpenTelemetry | `opentelemetry-api/sdk/exporter>=1.
|
|
104
|
+
| OpenTelemetry | `opentelemetry-api/sdk/exporter>=1.45.1` (optional extra) |
|
|
101
105
|
| Loguru bridge | `loguru>=0.7.2` (optional extra) |
|
|
102
106
|
|
|
103
107
|
---
|
|
@@ -172,8 +176,6 @@ import fastapiobserver
|
|
|
172
176
|
|
|
173
177
|
---
|
|
174
178
|
|
|
175
|
-
## 5-Minute Quick Start
|
|
176
|
-
|
|
177
179
|
## 5-Minute Quick Start ("Zero-Glue")
|
|
178
180
|
|
|
179
181
|
You can configure the entire library via environment variables simply by calling `install_observability(app)`.
|
|
@@ -233,16 +235,17 @@ To dramatically reduce boilerplate, you can use the `OBS_PROFILE` environment va
|
|
|
233
235
|
|
|
234
236
|
## Documentation Map
|
|
235
237
|
|
|
236
|
-
|
|
237
|
-
- [Security & Presets](security
|
|
238
|
-
- [Environment Variables](configuration
|
|
239
|
-
- [Runtime Control](runtime-control
|
|
240
|
-
- [OpenTelemetry](opentelemetry
|
|
241
|
-
- [Logtail Sink](logtail-sink
|
|
242
|
-
- [Audit Logging](audit-logging
|
|
243
|
-
- [Database Tracing](db-tracing
|
|
244
|
-
- [GraphQL Support](graphql
|
|
245
|
-
- [Architecture & Operations](architecture
|
|
246
|
-
- [Production Deployment](deployment
|
|
247
|
-
- [Performance Tuning](tuning
|
|
248
|
-
- [Advanced Operations](advanced
|
|
238
|
+
Full documentation lives at [vitaee.github.io/FastapiObserver](https://vitaee.github.io/FastapiObserver/). Deep dives:
|
|
239
|
+
- [Security & Presets](https://vitaee.github.io/FastapiObserver/security/)
|
|
240
|
+
- [Environment Variables](https://vitaee.github.io/FastapiObserver/configuration/)
|
|
241
|
+
- [Runtime Control](https://vitaee.github.io/FastapiObserver/runtime-control/)
|
|
242
|
+
- [OpenTelemetry](https://vitaee.github.io/FastapiObserver/opentelemetry/)
|
|
243
|
+
- [Logtail Sink](https://vitaee.github.io/FastapiObserver/logtail-sink/)
|
|
244
|
+
- [Audit Logging](https://vitaee.github.io/FastapiObserver/audit-logging/)
|
|
245
|
+
- [Database Tracing](https://vitaee.github.io/FastapiObserver/db-tracing/)
|
|
246
|
+
- [GraphQL Support](https://vitaee.github.io/FastapiObserver/graphql/)
|
|
247
|
+
- [Architecture & Operations](https://vitaee.github.io/FastapiObserver/architecture/)
|
|
248
|
+
- [Production Deployment](https://vitaee.github.io/FastapiObserver/deployment/)
|
|
249
|
+
- [Performance Tuning](https://vitaee.github.io/FastapiObserver/tuning/)
|
|
250
|
+
- [Advanced Operations](https://vitaee.github.io/FastapiObserver/advanced/)
|
|
251
|
+
- [Maintenance & Contributing](https://vitaee.github.io/FastapiObserver/contributing/) (quality gates, release flow, runtime stress harness)
|
|
@@ -55,6 +55,7 @@ src/fastapiobserver/middleware/metrics.py
|
|
|
55
55
|
src/fastapiobserver/middleware/request_logging.py
|
|
56
56
|
src/fastapiobserver/middleware/span_errors.py
|
|
57
57
|
src/fastapiobserver/otel/__init__.py
|
|
58
|
+
src/fastapiobserver/otel/exclusions.py
|
|
58
59
|
src/fastapiobserver/otel/lifecycle.py
|
|
59
60
|
src/fastapiobserver/otel/logs.py
|
|
60
61
|
src/fastapiobserver/otel/metrics.py
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
fastapi>=0.133.0
|
|
2
|
+
pydantic-settings>=2.10.1
|
|
3
|
+
starlette>=1.3.1
|
|
4
|
+
|
|
5
|
+
[all]
|
|
6
|
+
orjson>=3.11.7
|
|
7
|
+
prometheus-client>=0.24.1
|
|
8
|
+
loguru>=0.7.2
|
|
9
|
+
opentelemetry-api>=1.45.1
|
|
10
|
+
opentelemetry-sdk>=1.45.1
|
|
11
|
+
opentelemetry-exporter-otlp>=1.45.1
|
|
12
|
+
opentelemetry-instrumentation-fastapi>=0.66b1
|
|
13
|
+
opentelemetry-instrumentation-logging>=0.66b1
|
|
14
|
+
opentelemetry-instrumentation-httpx>=0.66b1
|
|
15
|
+
opentelemetry-instrumentation-requests>=0.66b1
|
|
16
|
+
opentelemetry-instrumentation-sqlalchemy>=0.66b1
|
|
17
|
+
cryptography>=50.0.0
|
|
18
|
+
|
|
19
|
+
[audit]
|
|
20
|
+
cryptography>=50.0.0
|
|
21
|
+
|
|
22
|
+
[dev]
|
|
23
|
+
loguru>=0.7.3
|
|
24
|
+
mypy>=2.4.1
|
|
25
|
+
pip-audit>=2.10.1
|
|
26
|
+
pytest>=9.2.0
|
|
27
|
+
pytest-randomly>=5.0.0
|
|
28
|
+
ruff>=0.17.3
|
|
29
|
+
cyclonedx-bom>=7.6.0
|
|
30
|
+
uvicorn>=0.54.0
|
|
31
|
+
|
|
32
|
+
[dev:python_version < "3.11"]
|
|
33
|
+
httpx>=0.28.1
|
|
34
|
+
|
|
35
|
+
[dev:python_version >= "3.11"]
|
|
36
|
+
httpx2>=2.16.0
|
|
37
|
+
|
|
38
|
+
[fast-json]
|
|
39
|
+
orjson>=3.11.7
|
|
40
|
+
|
|
41
|
+
[loguru]
|
|
42
|
+
loguru>=0.7.2
|
|
43
|
+
|
|
44
|
+
[otel]
|
|
45
|
+
opentelemetry-api>=1.45.1
|
|
46
|
+
opentelemetry-sdk>=1.45.1
|
|
47
|
+
opentelemetry-exporter-otlp>=1.45.1
|
|
48
|
+
opentelemetry-instrumentation-fastapi>=0.66b1
|
|
49
|
+
opentelemetry-instrumentation-logging>=0.66b1
|
|
50
|
+
|
|
51
|
+
[otel-httpx]
|
|
52
|
+
opentelemetry-instrumentation-httpx>=0.66b1
|
|
53
|
+
|
|
54
|
+
[otel-requests]
|
|
55
|
+
opentelemetry-instrumentation-requests>=0.66b1
|
|
56
|
+
|
|
57
|
+
[otel-sqlalchemy]
|
|
58
|
+
opentelemetry-instrumentation-sqlalchemy>=0.66b1
|
|
59
|
+
|
|
60
|
+
[prometheus]
|
|
61
|
+
prometheus-client>=0.24.1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.4.1"
|
|
@@ -5,9 +5,8 @@ import re
|
|
|
5
5
|
from typing import Literal
|
|
6
6
|
|
|
7
7
|
from pydantic import Field, field_validator
|
|
8
|
-
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
9
8
|
|
|
10
|
-
from .utils import normalize_path, parse_csv
|
|
9
|
+
from .utils import InternalSettingsBase, normalize_path, parse_csv
|
|
11
10
|
|
|
12
11
|
_HEADER_NAME_RE = re.compile(r"^[A-Za-z0-9-]+$")
|
|
13
12
|
DEFAULT_METRICS_EXCLUDE_PATHS = (
|
|
@@ -22,12 +21,7 @@ MetricsFormat = Literal["prometheus", "openmetrics", "negotiate"]
|
|
|
22
21
|
LogQueueOverflowPolicy = Literal["drop_oldest", "drop_newest", "block"]
|
|
23
22
|
|
|
24
23
|
|
|
25
|
-
class ObservabilitySettings(
|
|
26
|
-
model_config = SettingsConfigDict(
|
|
27
|
-
extra="ignore",
|
|
28
|
-
case_sensitive=False,
|
|
29
|
-
populate_by_name=True,
|
|
30
|
-
)
|
|
24
|
+
class ObservabilitySettings(InternalSettingsBase):
|
|
31
25
|
|
|
32
26
|
# --- identity ---
|
|
33
27
|
app_name: str = Field(default="app", validation_alias="APP_NAME")
|