c2cwsgiutils 6.1.2__tar.gz → 6.1.3__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.
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/PKG-INFO +2 -2
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/README.md +1 -1
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/acceptance/package-lock.json +8 -8
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/acceptance/package.json +1 -1
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/sqlalchemylogger/handlers.py +1 -1
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/stats_pyramid/_pyramid_spy.py +12 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/pyproject.toml +8 -8
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/LICENSE +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/__init__.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/acceptance/__init__.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/acceptance/connection.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/acceptance/image.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/acceptance/print.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/acceptance/screenshot.js +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/acceptance/utils.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/auth.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/broadcast/__init__.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/broadcast/interface.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/broadcast/local.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/broadcast/redis.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/broadcast/utils.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/client_info.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/config_utils.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/coverage_setup.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/db.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/db_maintenance_view.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/debug/__init__.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/debug/_listeners.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/debug/_views.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/debug/utils.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/errors.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/health_check.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/index.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/loader.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/logging_view.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/models_graph.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/pretty_json.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/profiler.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/prometheus.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/py.typed +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/pyramid.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/pyramid_logging.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/redis_stats.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/redis_utils.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/request_tracking/__init__.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/request_tracking/_sql.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/scripts/__init__.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/scripts/genversion.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/scripts/stats_db.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/scripts/test_print.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/sentry.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/services.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/setup_process.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/sql_profiler/__init__.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/sql_profiler/_impl.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/sqlalchemylogger/README.md +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/sqlalchemylogger/__init__.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/sqlalchemylogger/_filters.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/sqlalchemylogger/_models.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/sqlalchemylogger/examples/example.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/static/favicon-16x16.png +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/static/favicon-32x32.png +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/stats_pyramid/__init__.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/stats_pyramid/_db_spy.py +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/templates/index.html.mako +0 -0
- {c2cwsgiutils-6.1.2 → c2cwsgiutils-6.1.3}/c2cwsgiutils/version.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: c2cwsgiutils
|
3
|
-
Version: 6.1.
|
3
|
+
Version: 6.1.3
|
4
4
|
Summary: Common utilities for Camptocamp WSGI applications
|
5
5
|
Home-page: https://github.com/camptocamp/c2cwsgiutils
|
6
6
|
License: BSD-2-Clause
|
@@ -64,7 +64,7 @@ Description-Content-Type: text/markdown
|
|
64
64
|
|
65
65
|
# Camptocamp WSGI utilities
|
66
66
|
|
67
|
-
This is a Python 3 library
|
67
|
+
This is a Python 3 library providing common tools for Camptocamp WSGI
|
68
68
|
applications:
|
69
69
|
|
70
70
|
- Provide prometheus metrics
|
@@ -6,7 +6,7 @@
|
|
6
6
|
"": {
|
7
7
|
"dependencies": {
|
8
8
|
"commander": "12.1.0",
|
9
|
-
"puppeteer": "23.5.
|
9
|
+
"puppeteer": "23.5.3"
|
10
10
|
}
|
11
11
|
},
|
12
12
|
"node_modules/@babel/code-frame": {
|
@@ -909,9 +909,9 @@
|
|
909
909
|
}
|
910
910
|
},
|
911
911
|
"node_modules/puppeteer": {
|
912
|
-
"version": "23.5.
|
913
|
-
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.5.
|
914
|
-
"integrity": "sha512-
|
912
|
+
"version": "23.5.3",
|
913
|
+
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.5.3.tgz",
|
914
|
+
"integrity": "sha512-FghmfBsr/UUpe48OiCg1gV3W4vVfQJKjQehbF07SjnQvEpWcvPTah1nykfGWdOQQ1ydJPIXcajzWN7fliCU3zw==",
|
915
915
|
"hasInstallScript": true,
|
916
916
|
"license": "Apache-2.0",
|
917
917
|
"dependencies": {
|
@@ -919,7 +919,7 @@
|
|
919
919
|
"chromium-bidi": "0.8.0",
|
920
920
|
"cosmiconfig": "^9.0.0",
|
921
921
|
"devtools-protocol": "0.0.1342118",
|
922
|
-
"puppeteer-core": "23.5.
|
922
|
+
"puppeteer-core": "23.5.3",
|
923
923
|
"typed-query-selector": "^2.12.0"
|
924
924
|
},
|
925
925
|
"bin": {
|
@@ -930,9 +930,9 @@
|
|
930
930
|
}
|
931
931
|
},
|
932
932
|
"node_modules/puppeteer-core": {
|
933
|
-
"version": "23.5.
|
934
|
-
"resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.5.
|
935
|
-
"integrity": "sha512
|
933
|
+
"version": "23.5.3",
|
934
|
+
"resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.5.3.tgz",
|
935
|
+
"integrity": "sha512-V58MZD/B3CwkYsqSEQlHKbavMJptF04fzhMdUpiCRCmUVhwZNwSGEPhaiZ1f8I3ABQUirg3VNhXVB6Z1ubHXtQ==",
|
936
936
|
"license": "Apache-2.0",
|
937
937
|
"dependencies": {
|
938
938
|
"@puppeteer/browsers": "2.4.0",
|
@@ -102,7 +102,7 @@ class SQLAlchemyHandler(logging.Handler):
|
|
102
102
|
with self.engine.begin() as connection:
|
103
103
|
if not self.engine.dialect.has_schema(connection, self.Log.__table_args__["schema"]):
|
104
104
|
connection.execute(
|
105
|
-
sqlalchemy.schema.CreateSchema(self.Log.__table_args__["schema"]),
|
105
|
+
sqlalchemy.schema.CreateSchema(self.Log.__table_args__["schema"]),
|
106
106
|
)
|
107
107
|
Base.metadata.create_all(self.engine)
|
108
108
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import logging
|
1
2
|
import time
|
2
3
|
from typing import Callable, Optional
|
3
4
|
|
@@ -9,6 +10,8 @@ from pyramid.httpexceptions import HTTPException
|
|
9
10
|
|
10
11
|
from c2cwsgiutils import prometheus
|
11
12
|
|
13
|
+
_LOG = logging.getLogger(__name__)
|
14
|
+
|
12
15
|
_PROMETHEUS_PYRAMID_ROUTES_SUMMARY = prometheus_client.Summary(
|
13
16
|
prometheus.build_metric_name("pyramid_routes"),
|
14
17
|
"Pyramid routes",
|
@@ -61,6 +64,15 @@ def _create_finished_cb(
|
|
61
64
|
name = request.matched_route.name
|
62
65
|
if kind == "route":
|
63
66
|
_add_server_metric(request, "route", description=name)
|
67
|
+
if status >= 500:
|
68
|
+
_LOG.warning(
|
69
|
+
"Request %s %s %s route %s return status %s",
|
70
|
+
request.method,
|
71
|
+
request.path,
|
72
|
+
kind,
|
73
|
+
name,
|
74
|
+
status,
|
75
|
+
)
|
64
76
|
measure.labels(
|
65
77
|
method=request.method, route=name, status=status, group=str(status // 100 * 100)
|
66
78
|
).observe(time.process_time() - start)
|
@@ -16,7 +16,7 @@ strict = true
|
|
16
16
|
|
17
17
|
[tool.poetry]
|
18
18
|
name = "c2cwsgiutils"
|
19
|
-
version = "6.1.
|
19
|
+
version = "6.1.3"
|
20
20
|
description = "Common utilities for Camptocamp WSGI applications"
|
21
21
|
readme = "README.md"
|
22
22
|
authors = ["Camptocamp <info@camptocamp.com>"]
|
@@ -72,17 +72,17 @@ pyyaml = { version = "6.0.2" }
|
|
72
72
|
alembic = { version = "1.13.3", optional = true }
|
73
73
|
boltons = { version = "24.0.0", optional = true }
|
74
74
|
cornice = { version = "6.1.0", optional = true }
|
75
|
-
redis = { version = "5.1.
|
75
|
+
redis = { version = "5.1.1", optional = true }
|
76
76
|
gunicorn = { version = "23.0.0", optional = true }
|
77
77
|
lxml = { version = "5.3.0", optional = true }
|
78
|
-
objgraph = { version = "3.6.
|
79
|
-
psycopg2 = { version = "2.9.
|
78
|
+
objgraph = { version = "3.6.2", optional = true }
|
79
|
+
psycopg2 = { version = "2.9.10", optional = true }
|
80
80
|
pyramid = { version = "2.0.2", optional = true }
|
81
81
|
pyramid-tm = { version = "2.5", optional = true }
|
82
82
|
sentry-sdk = { version = "2.15.0", optional = true }
|
83
83
|
ujson = { version = "5.10.0" }
|
84
84
|
cee_syslog_handler = { version = "0.6.0" }
|
85
|
-
SQLAlchemy = { version = "2.0.
|
85
|
+
SQLAlchemy = { version = "2.0.36", optional = true }
|
86
86
|
SQLAlchemy-Utils = { version = "0.41.2", optional = true }
|
87
87
|
"zope.interface" = { version = "7.0.3", optional = true }
|
88
88
|
"zope.sqlalchemy" = { version = "3.1", optional = true }
|
@@ -170,16 +170,16 @@ test_images = ["scikit-image"]
|
|
170
170
|
|
171
171
|
[tool.poetry.group.dev.dependencies]
|
172
172
|
# pylint = { version = "2.15.6" }
|
173
|
-
prospector = { extras = ["with_bandit", "with_mypy", "with_pyroma"], version = "1.12.
|
173
|
+
prospector = { extras = ["with_bandit", "with_mypy", "with_pyroma"], version = "1.12.1" }
|
174
174
|
prospector-profile-duplicated = "1.6.0"
|
175
175
|
prospector-profile-utils = "1.9.1"
|
176
|
-
coverage = "7.6.
|
176
|
+
coverage = "7.6.4"
|
177
177
|
junit2html = "31.0.2"
|
178
178
|
pytest = "8.3.3"
|
179
179
|
pytest-cov = "5.0.0"
|
180
180
|
pytest-html = "4.1.1"
|
181
181
|
types-pyyaml = "6.0.12.20240917"
|
182
|
-
types-requests = "2.32.0.
|
182
|
+
types-requests = "2.32.0.20241016"
|
183
183
|
types-redis = "4.6.0.20241004"
|
184
184
|
types-ujson = "5.10.0.20240515"
|
185
185
|
types-python-dateutil = "2.9.0.20241003"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|