kinto 21.1.0__tar.gz → 22.0.0__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.
Potentially problematic release.
This version of kinto might be problematic. Click here for more details.
- {kinto-21.1.0 → kinto-22.0.0}/PKG-INFO +1 -1
- {kinto-21.1.0 → kinto-22.0.0}/constraints.txt +4 -4
- {kinto-21.1.0 → kinto-22.0.0}/docs/configuration/settings.rst +2 -2
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/initialization.py +18 -17
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/metrics.py +4 -4
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/prometheus.py +8 -26
- {kinto-21.1.0 → kinto-22.0.0}/kinto.egg-info/PKG-INFO +1 -1
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/resource/test_events.py +2 -2
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_initialization.py +2 -2
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_metrics.py +2 -2
- {kinto-21.1.0 → kinto-22.0.0}/tests/plugins/test_history.py +1 -1
- {kinto-21.1.0 → kinto-22.0.0}/tests/plugins/test_prometheus.py +0 -29
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_views_metrics.py +14 -4
- {kinto-21.1.0 → kinto-22.0.0}/.dockerignore +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/.github/CODE_OF_CONDUCT.md +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/.github/CONTRIBUTING.md +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/.github/dependabot.yml +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/.github/release.yml +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/.github/workflows/labels.yaml +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/.github/workflows/publish.yml +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/.github/workflows/scheduled.yml +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/.github/workflows/test.yml +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/.gitignore +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/.readthedocs.yaml +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/CHANGELOG.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/CONTRIBUTORS.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/Dockerfile +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/LICENSE +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/Makefile +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/README.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/SECURITY.md +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/SUPPORT.md +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/app.wsgi +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/constraints.in +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docker-compose.yml +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/_static/piwik.js +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/_static/theme_overrides.css +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/_templates/footer.html +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/_templates/indexcontent.html +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/_templates/layout.html +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/_details-delete-list.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/_details-delete-object.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/_details-get-list.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/_details-get-object.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/_details-head-list.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/_details-patch-object.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/_details-post-list.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/_details-put-object.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/_status-delete-list.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/_status-delete-object.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/_status-get-list.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/_status-get-object.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/_status-patch-object.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/_status-post-list.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/_status-put-object.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/accounts.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/admin.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/authentication.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/backoff.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/batch.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/buckets.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/collections.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/deprecation.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/errors.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/filtering.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/flush.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/groups.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/history.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/index.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/openapi.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/openid.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/pagination.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/permissions.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/records.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/selecting_fields.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/sorting.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/timestamps.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/1.x/utilities.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/index.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/api/versioning.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/changelog.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/commandline.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/community.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/concepts.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/conf.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/configuration/good-practices.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/configuration/index.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/configuration/production.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/core/_static/theme_overrides.css +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/core/api.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/core/cache.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/core/decorators.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/core/errors.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/core/glossary.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/core/images/cliquet-base.png +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/core/images/cliquet-mozilla.png +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/core/index.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/core/notifications.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/core/permission.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/core/quickstart.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/core/rationale.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/core/resource.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/core/storage.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/core/testing.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/core/utils.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/core/viewsets.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/faq.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/alwaysdata-button.svg +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/architecture.svg +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/color-formatter.png +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/concepts-general.png +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/concepts-permissions.png +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/heroku-button.png +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/kinto-logo.png +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/kinto-logo.svg +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/logo-admin.svg +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/logo-attachment.svg +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/logo-community.svg +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/logo-history.svg +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/logo-javascript.svg +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/logo-jsonschema.svg +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/logo-multiapps.svg +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/logo-permissions.svg +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/logo-python.svg +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/logo-selfhostable.svg +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/logo-synchronisation.svg +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/overview-deployonce-selfhost.png +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/overview-features.png +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/overview-synchronisation.png +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/overview-use-cases.png +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/scalingo-button.svg +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/screenshot-kinto-admin-1.png +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/screenshot-kinto-admin-2.png +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/screenshot-kinto-admin-3.png +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/screenshot-kinto-admin-4.png +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/sequence-storage.png +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/sync-both.svg +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/sync-newest.svg +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/images/sync-oldest.svg +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/index.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/kinto-admin.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/overview.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/requirements.txt +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/troubleshooting.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/tutorials/custom-id-generator.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/tutorials/first-steps.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/tutorials/index.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/tutorials/install.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/tutorials/notifications-custom.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/tutorials/permission-setups.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/tutorials/permissions.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/tutorials/synchronisation.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/docs/tutorials/write-plugin.rst +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/__main__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/authorization.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/config/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/config/kinto.tpl +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/contribute.json +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/authentication.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/authorization.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cache/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cache/memcached.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cache/memory.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cache/postgresql/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cache/postgresql/schema.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cache/testing.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice/cors.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice/errors.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice/pyramidhook.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice/renderer.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice/resource.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice/service.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice/util.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice/validators/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice/validators/_colander.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice/validators/_marshmallow.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice_swagger/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice_swagger/converters/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice_swagger/converters/exceptions.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice_swagger/converters/parameters.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice_swagger/converters/schema.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice_swagger/swagger.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice_swagger/templates/index.html +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice_swagger/templates/index_script_template.html +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice_swagger/util.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/cornice_swagger/views.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/decorators.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/errors.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/events.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/listeners/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/openapi.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/permission/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/permission/memory.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/permission/postgresql/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/permission/postgresql/migrations/migration_001_002.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/permission/postgresql/schema.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/permission/testing.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/resource/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/resource/model.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/resource/schema.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/resource/viewset.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/schema.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/scripts.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/statsd.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/exceptions.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/generators.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/memory.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/client.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_001_002.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_002_003.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_003_004.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_004_005.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_005_006.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_006_007.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_007_008.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_008_009.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_009_010.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_010_011.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_011_012.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_012_013.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_013_014.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_014_015.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_015_016.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_016_017.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_017_018.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_018_019.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_019_020.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_020_021.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_021_022.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrations/migration_022_023.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/migrator.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/pool.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/postgresql/schema.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/testing.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/storage/utils.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/testing.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/utils.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/views/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/views/batch.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/views/errors.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/views/heartbeat.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/views/hello.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/views/openapi.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/core/views/version.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/events.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/accounts/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/accounts/authentication.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/accounts/scripts.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/accounts/utils.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/accounts/views.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/admin/README.md +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/admin/VERSION +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/admin/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/admin/build/VERSION +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/admin/build/assets/asn1-EdZsLKOL.js +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/admin/build/assets/clojure-BMjYHr_A.js +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/admin/build/assets/css-BnMrqG3P.js +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/admin/build/assets/index-Cs7JVwIg.css +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/admin/build/assets/index-CylsivYB.js +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/admin/build/assets/javascript-qCveANmP.js +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/admin/build/assets/logo-VBRiKSPX.png +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/admin/build/assets/mllike-CXdrOF99.js +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/admin/build/assets/python-BuPzkPfP.js +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/admin/build/assets/rpm-CTu-6PCP.js +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/admin/build/assets/sql-D0XecflT.js +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/admin/build/assets/ttcn-cfg-B9xdYoR4.js +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/admin/build/index.html +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/admin/public/help.html +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/admin/views.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/default_bucket/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/flush.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/history/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/history/listener.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/history/views.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/openid/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/openid/utils.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/openid/views.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/plugins/statsd.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/schema_validation.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/views/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/views/admin.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/views/buckets.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/views/collections.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/views/contribute.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/views/groups.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/views/permissions.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto/views/records.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto.egg-info/SOURCES.txt +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto.egg-info/dependency_links.txt +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto.egg-info/entry_points.txt +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto.egg-info/requires.txt +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/kinto.egg-info/top_level.txt +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/pyproject.toml +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/scripts/pull-kinto-admin.sh +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/setup.cfg +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/browser.ini +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/browser.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/listeners.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/resource/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/resource/test_base.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/resource/test_cache_expires.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/resource/test_filter.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/resource/test_model.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/resource/test_object.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/resource/test_object_permissions.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/resource/test_pagination.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/resource/test_partial_response.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/resource/test_preconditions.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/resource/test_schema.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/resource/test_sort.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/resource/test_sync.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/resource/test_views.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/resource/test_views_cors.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/resource/test_viewset.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/schema/postgresql-permission-1.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/schema/postgresql-storage-1.6.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/schema/postgresql-storage-11.sql +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/support.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_authentication.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_authorization.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_cache.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_decorators.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_deprecation.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_errors.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_listeners.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_logging.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_openapi.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_permission.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_schema.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_scripts.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_storage.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_storage_migrations.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_storage_pool.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_utils.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_views_batch.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_views_errors.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_views_heartbeat.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_views_hello.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_views_openapi.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_views_postgresql.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/test_views_transaction.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/testapp/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/testapp/static/index.html +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/testapp/views.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/core/testplugin/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/functional.ini +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/functional.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/openapi/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/openapi/support.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/openapi/test_plugins.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/openapi/test_resources.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/openapi/test_responses_buckets.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/openapi/test_responses_collections.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/openapi/test_responses_errors.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/openapi/test_responses_groups.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/openapi/test_responses_records.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/openapi/test_validation.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/plugins/__init__.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/plugins/test_accounts.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/plugins/test_admin.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/plugins/test_default_bucket.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/plugins/test_flush.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/plugins/test_openid.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/plugins/test_statsd.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/support.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_authorization.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_config.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_configuration/test.ini +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_init.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_main.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_views_admin.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_views_buckets.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_views_collections.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_views_collections_cache.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_views_contribute.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_views_disable_default.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_views_groups.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_views_hello.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_views_objects_permissions.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_views_permissions.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_views_records.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_views_schema_collection.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_views_schema_group.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_views_schema_record.py +0 -0
- {kinto-21.1.0 → kinto-22.0.0}/tests/test_views_version.py +0 -0
|
@@ -73,7 +73,7 @@ markupsafe==2.1.4
|
|
|
73
73
|
# via werkzeug
|
|
74
74
|
msgpack==1.0.7
|
|
75
75
|
# via bravado-core
|
|
76
|
-
newrelic==10.
|
|
76
|
+
newrelic==10.11.0
|
|
77
77
|
# via -r constraints.in
|
|
78
78
|
packaging==23.2
|
|
79
79
|
# via
|
|
@@ -88,7 +88,7 @@ plaster==1.1.2
|
|
|
88
88
|
# pyramid
|
|
89
89
|
plaster-pastedeploy==1.0.1
|
|
90
90
|
# via pyramid
|
|
91
|
-
playwright==1.
|
|
91
|
+
playwright==1.52.0
|
|
92
92
|
# via -r constraints.in
|
|
93
93
|
pluggy==1.5.0
|
|
94
94
|
# via pytest
|
|
@@ -96,7 +96,7 @@ prometheus-client==0.21.1
|
|
|
96
96
|
# via -r constraints.in
|
|
97
97
|
psycopg2-binary==2.9.10
|
|
98
98
|
# via -r constraints.in
|
|
99
|
-
pyee==
|
|
99
|
+
pyee==13.0.0
|
|
100
100
|
# via playwright
|
|
101
101
|
pyproject-hooks==1.0.0
|
|
102
102
|
# via build
|
|
@@ -149,7 +149,7 @@ rpds-py==0.17.1
|
|
|
149
149
|
# via
|
|
150
150
|
# jsonschema
|
|
151
151
|
# referencing
|
|
152
|
-
ruff==0.11.
|
|
152
|
+
ruff==0.11.8
|
|
153
153
|
# via -r constraints.in
|
|
154
154
|
sentry-sdk==2.8.0
|
|
155
155
|
# via -r constraints.in
|
|
@@ -516,8 +516,8 @@ Prometheus metrics can be enabled with (disabled by default):
|
|
|
516
516
|
# Expose metrics created time (default: true)
|
|
517
517
|
# kinto.prometheus_created_metrics_enabled = false
|
|
518
518
|
|
|
519
|
-
#
|
|
520
|
-
# kinto.
|
|
519
|
+
# Control cardinality when URL fields become labels (default: bucket_id collection_id group_id record_id)
|
|
520
|
+
# kinto.metrics_matchdict_fields = bucket_id collection_id
|
|
521
521
|
|
|
522
522
|
Metrics can then be crawled from the ``/__metrics__`` endpoint.
|
|
523
523
|
|
|
@@ -472,10 +472,18 @@ def setup_metrics(config):
|
|
|
472
472
|
auth, user_id = user_id.split(":")
|
|
473
473
|
metrics_service.count("users", unique=[("auth", auth), ("userid", user_id)])
|
|
474
474
|
|
|
475
|
+
status = event.response.status_code
|
|
476
|
+
|
|
477
|
+
if status >= 400:
|
|
478
|
+
# Prevent random values of 404 responses to become label values.
|
|
479
|
+
request_matchdict = {}
|
|
480
|
+
else:
|
|
481
|
+
request_matchdict = dict(request.matchdict or {})
|
|
482
|
+
|
|
475
483
|
# Add extra labels to metrics, based on fields extracted from the request matchdict.
|
|
476
484
|
metrics_matchdict_fields = aslist(settings["metrics_matchdict_fields"])
|
|
477
485
|
# Turn the `id` field of object endpoints into `{resource}_id` (eg. `mushroom_id`, `bucket_id`)
|
|
478
|
-
enhanced_matchdict =
|
|
486
|
+
enhanced_matchdict = request_matchdict
|
|
479
487
|
try:
|
|
480
488
|
enhanced_matchdict[request.current_resource_name + "_id"] = enhanced_matchdict.get(
|
|
481
489
|
"id", ""
|
|
@@ -487,8 +495,6 @@ def setup_metrics(config):
|
|
|
487
495
|
(field, enhanced_matchdict.get(field, "")) for field in metrics_matchdict_fields
|
|
488
496
|
]
|
|
489
497
|
|
|
490
|
-
status = event.response.status_code
|
|
491
|
-
|
|
492
498
|
service = request.current_service
|
|
493
499
|
if service:
|
|
494
500
|
# Use the service name as endpoint if available.
|
|
@@ -501,16 +507,14 @@ def setup_metrics(config):
|
|
|
501
507
|
"unnamed" if status != 404 else "unknown"
|
|
502
508
|
) # Do not multiply cardinality for unknown endpoints.
|
|
503
509
|
|
|
510
|
+
request_labels = [
|
|
511
|
+
("method", request.method.lower()),
|
|
512
|
+
("endpoint", endpoint),
|
|
513
|
+
("status", str(status)),
|
|
514
|
+
] + metrics_matchdict_labels
|
|
515
|
+
|
|
504
516
|
# Count served requests.
|
|
505
|
-
metrics_service.count(
|
|
506
|
-
"request_summary",
|
|
507
|
-
unique=[
|
|
508
|
-
("method", request.method.lower()),
|
|
509
|
-
("endpoint", endpoint),
|
|
510
|
-
("status", str(status)),
|
|
511
|
-
]
|
|
512
|
-
+ metrics_matchdict_labels,
|
|
513
|
-
)
|
|
517
|
+
metrics_service.count("request_summary", unique=request_labels)
|
|
514
518
|
|
|
515
519
|
try:
|
|
516
520
|
current = utils.msec_time()
|
|
@@ -518,8 +522,7 @@ def setup_metrics(config):
|
|
|
518
522
|
metrics_service.timer(
|
|
519
523
|
"request_duration",
|
|
520
524
|
value=duration,
|
|
521
|
-
labels=
|
|
522
|
-
+ metrics_matchdict_labels,
|
|
525
|
+
labels=request_labels,
|
|
523
526
|
)
|
|
524
527
|
except AttributeError: # pragma: no cover
|
|
525
528
|
# Logging was not setup in this Kinto app (unlikely but possible)
|
|
@@ -527,9 +530,7 @@ def setup_metrics(config):
|
|
|
527
530
|
|
|
528
531
|
# Observe response size.
|
|
529
532
|
metrics_service.observe(
|
|
530
|
-
"request_size",
|
|
531
|
-
len(event.response.body or b""),
|
|
532
|
-
labels=[("endpoint", endpoint)] + metrics_matchdict_labels,
|
|
533
|
+
"request_size", len(event.response.body or b""), labels=request_labels
|
|
533
534
|
)
|
|
534
535
|
|
|
535
536
|
# Count authentication verifications.
|
|
@@ -13,7 +13,7 @@ class IMetricsService(Interface):
|
|
|
13
13
|
|
|
14
14
|
def timer(key):
|
|
15
15
|
"""
|
|
16
|
-
Watch execution time.
|
|
16
|
+
Watch execution time in seconds.
|
|
17
17
|
"""
|
|
18
18
|
|
|
19
19
|
def observe(self, key, value, labels=[]):
|
|
@@ -68,9 +68,9 @@ def watch_execution_time(metrics_service, obj, prefix="", classname=None):
|
|
|
68
68
|
method = getattr(obj, name)
|
|
69
69
|
is_method = isinstance(method, types.MethodType)
|
|
70
70
|
if not name.startswith("_") and is_method:
|
|
71
|
-
|
|
71
|
+
metric_name = f"{prefix}.{classname}.seconds"
|
|
72
72
|
labels = [("method", name)]
|
|
73
|
-
decorated_method = metrics_service.timer(
|
|
73
|
+
decorated_method = metrics_service.timer(metric_name, labels=labels)(method)
|
|
74
74
|
setattr(obj, name, decorated_method)
|
|
75
75
|
|
|
76
76
|
|
|
@@ -88,7 +88,7 @@ def listener_with_timer(config, key, func):
|
|
|
88
88
|
# not listed in the `initialization_sequence` setting.
|
|
89
89
|
return func(*args, **kwargs)
|
|
90
90
|
# If metrics are enabled, monitor execution time of listeners.
|
|
91
|
-
with metrics_service.timer(key):
|
|
91
|
+
with metrics_service.timer(key + ".seconds" if not key.endswith(".seconds") else key):
|
|
92
92
|
return func(*args, **kwargs)
|
|
93
93
|
|
|
94
94
|
return wrapped
|
|
@@ -6,7 +6,7 @@ from time import perf_counter as time_now
|
|
|
6
6
|
|
|
7
7
|
from pyramid.exceptions import ConfigurationError
|
|
8
8
|
from pyramid.response import Response
|
|
9
|
-
from pyramid.settings import asbool
|
|
9
|
+
from pyramid.settings import asbool
|
|
10
10
|
from zope.interface import implementer
|
|
11
11
|
|
|
12
12
|
from kinto.core import metrics
|
|
@@ -53,7 +53,7 @@ class Timer:
|
|
|
53
53
|
"""
|
|
54
54
|
A decorator to time the execution of a function. It will use the
|
|
55
55
|
`prometheus_client.Histogram` to record the time taken by the function
|
|
56
|
-
in
|
|
56
|
+
in seconds. The histogram is passed as an argument to the
|
|
57
57
|
constructor.
|
|
58
58
|
|
|
59
59
|
Main limitation: it does not support `labels` on the decorator.
|
|
@@ -78,8 +78,8 @@ class Timer:
|
|
|
78
78
|
try:
|
|
79
79
|
return f(*args, **kwargs)
|
|
80
80
|
finally:
|
|
81
|
-
|
|
82
|
-
self.histogram.observe(
|
|
81
|
+
dt_sec = time_now() - start_time
|
|
82
|
+
self.histogram.observe(dt_sec)
|
|
83
83
|
|
|
84
84
|
return _wrapped
|
|
85
85
|
|
|
@@ -96,14 +96,14 @@ class Timer:
|
|
|
96
96
|
def stop(self):
|
|
97
97
|
if self._start_time is None: # pragma: nocover
|
|
98
98
|
raise RuntimeError("Timer has not started.")
|
|
99
|
-
|
|
100
|
-
self.histogram.observe(
|
|
99
|
+
dt_sec = time_now() - self._start_time
|
|
100
|
+
self.histogram.observe(dt_sec)
|
|
101
101
|
return self
|
|
102
102
|
|
|
103
103
|
|
|
104
104
|
@implementer(metrics.IMetricsService)
|
|
105
105
|
class PrometheusService:
|
|
106
|
-
def __init__(self, prefix=""
|
|
106
|
+
def __init__(self, prefix=""):
|
|
107
107
|
prefix_clean = ""
|
|
108
108
|
if prefix:
|
|
109
109
|
# In GCP Console, the metrics are grouped by the first
|
|
@@ -112,19 +112,10 @@ class PrometheusService:
|
|
|
112
112
|
# (eg. `remote-settings` -> `remotesettings_`, `kinto_` -> `kinto_`)
|
|
113
113
|
prefix_clean = _fix_metric_name(prefix).replace("_", "") + "_"
|
|
114
114
|
self.prefix = prefix_clean.lower()
|
|
115
|
-
self.exclude_labels = exclude_labels or []
|
|
116
|
-
|
|
117
|
-
def _exclude_labels(self, labels):
|
|
118
|
-
return [
|
|
119
|
-
(label_name, label_value)
|
|
120
|
-
for label_name, label_value in labels
|
|
121
|
-
if label_name not in self.exclude_labels
|
|
122
|
-
]
|
|
123
115
|
|
|
124
116
|
def timer(self, key, value=None, labels=[]):
|
|
125
117
|
global _METRICS
|
|
126
118
|
key = self.prefix + key
|
|
127
|
-
labels = self._exclude_labels(labels)
|
|
128
119
|
|
|
129
120
|
if key not in _METRICS:
|
|
130
121
|
_METRICS[key] = prometheus_module.Histogram(
|
|
@@ -154,7 +145,6 @@ class PrometheusService:
|
|
|
154
145
|
def observe(self, key, value, labels=[]):
|
|
155
146
|
global _METRICS
|
|
156
147
|
key = self.prefix + key
|
|
157
|
-
labels = self._exclude_labels(labels)
|
|
158
148
|
|
|
159
149
|
if key not in _METRICS:
|
|
160
150
|
_METRICS[key] = prometheus_module.Summary(
|
|
@@ -195,7 +185,6 @@ class PrometheusService:
|
|
|
195
185
|
label_name, label_value = unique.rsplit(".", 1)
|
|
196
186
|
unique = [(label_name, label_value)]
|
|
197
187
|
|
|
198
|
-
unique = self._exclude_labels(unique)
|
|
199
188
|
labels = [
|
|
200
189
|
(_fix_metric_name(label_name), label_value) for label_name, label_value in unique
|
|
201
190
|
]
|
|
@@ -269,11 +258,4 @@ def includeme(config):
|
|
|
269
258
|
|
|
270
259
|
prefix = settings.get("prometheus_prefix", settings["project_name"])
|
|
271
260
|
|
|
272
|
-
|
|
273
|
-
# labels (eg. records_id). This way all metrics will be grouped by the
|
|
274
|
-
# remaining labels.
|
|
275
|
-
exclude_labels = aslist(settings.get("prometheus_exclude_labels", ""))
|
|
276
|
-
|
|
277
|
-
config.registry.registerUtility(
|
|
278
|
-
PrometheusService(prefix=prefix, exclude_labels=exclude_labels), metrics.IMetricsService
|
|
279
|
-
)
|
|
261
|
+
config.registry.registerUtility(PrometheusService(prefix=prefix), metrics.IMetricsService)
|
|
@@ -511,7 +511,7 @@ class StatsDTest(BaseWebTest, unittest.TestCase):
|
|
|
511
511
|
with mock.patch.object(metrics_client, "timing") as mocked:
|
|
512
512
|
self.app.post_json(self.plural_url, {"data": {"name": "pouet"}}, headers=self.headers)
|
|
513
513
|
timers = set(c[0][0] for c in mocked.call_args_list)
|
|
514
|
-
self.assertIn("listeners.test", timers)
|
|
514
|
+
self.assertIn("listeners.test.seconds", timers)
|
|
515
515
|
|
|
516
516
|
|
|
517
517
|
@skip_if_no_prometheus
|
|
@@ -529,4 +529,4 @@ class PrometheusTest(BaseWebTest, unittest.TestCase):
|
|
|
529
529
|
self.app.post_json(self.plural_url, {"data": {"name": "pouet"}}, headers=self.headers)
|
|
530
530
|
|
|
531
531
|
resp = self.app.get("/__metrics__")
|
|
532
|
-
self.assertIn("
|
|
532
|
+
self.assertIn("listeners_test_seconds_count 1.0", resp.text)
|
|
@@ -433,7 +433,7 @@ class MetricsConfigurationTest(unittest.TestCase):
|
|
|
433
433
|
self.mocked().observe.assert_any_call(
|
|
434
434
|
"request_size",
|
|
435
435
|
len("{}"),
|
|
436
|
-
labels=[("endpoint", "heartbeat")],
|
|
436
|
+
labels=[("method", "get"), ("endpoint", "heartbeat"), ("status", "200")],
|
|
437
437
|
)
|
|
438
438
|
|
|
439
439
|
def test_statsd_observe_request_duration(self):
|
|
@@ -443,7 +443,7 @@ class MetricsConfigurationTest(unittest.TestCase):
|
|
|
443
443
|
self.mocked().timer.assert_any_call(
|
|
444
444
|
"request_duration",
|
|
445
445
|
value=mock.ANY,
|
|
446
|
-
labels=[("endpoint", "heartbeat"), ("
|
|
446
|
+
labels=[("method", "get"), ("endpoint", "heartbeat"), ("status", "200")],
|
|
447
447
|
)
|
|
448
448
|
|
|
449
449
|
def test_statsd_counts_unknown_urls(self):
|
|
@@ -25,7 +25,7 @@ class WatchExecutionTimeTest(unittest.TestCase):
|
|
|
25
25
|
def test_public_methods_generates_statsd_calls(self):
|
|
26
26
|
self.test_object.test_method()
|
|
27
27
|
self.mocked.timer.assert_called_with(
|
|
28
|
-
"test.testedclass", labels=[("method", "test_method")]
|
|
28
|
+
"test.testedclass.seconds", labels=[("method", "test_method")]
|
|
29
29
|
)
|
|
30
30
|
|
|
31
31
|
def test_private_methods_does_not_generates_statsd_calls(self):
|
|
@@ -48,4 +48,4 @@ class ListenerWithTimerTest(unittest.TestCase):
|
|
|
48
48
|
wrapped = metrics.listener_with_timer(self.config, "key", self.func)
|
|
49
49
|
|
|
50
50
|
self.assertEqual(wrapped(42), 42)
|
|
51
|
-
self.config.registry.metrics.timer.assert_called_with("key")
|
|
51
|
+
self.config.registry.metrics.timer.assert_called_with("key.seconds")
|
|
@@ -38,7 +38,7 @@ class MetricsTest(HistoryWebTest):
|
|
|
38
38
|
def test_a_statsd_timer_is_used_for_history_if_configured(self):
|
|
39
39
|
with mock.patch("kinto.plugins.statsd.StatsDService.timer") as mocked:
|
|
40
40
|
self.app.put("/buckets/test", headers=self.headers)
|
|
41
|
-
mocked.assert_any_call("plugins.history")
|
|
41
|
+
mocked.assert_any_call("plugins.history.seconds")
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
class HistoryViewTest(HistoryWebTest):
|
|
@@ -174,32 +174,3 @@ class PrometheusNoCreatedTest(PrometheusWebTest):
|
|
|
174
174
|
|
|
175
175
|
self.assertIn("TYPE kintoprod_price summary", resp.text)
|
|
176
176
|
self.assertNotIn("TYPE kintoprod_price_created summary", resp.text)
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
@skip_if_no_prometheus
|
|
180
|
-
class PrometheusExcludedLabelsTest(PrometheusWebTest):
|
|
181
|
-
@classmethod
|
|
182
|
-
def get_app_settings(cls, extras=None):
|
|
183
|
-
settings = super().get_app_settings(extras)
|
|
184
|
-
settings["prometheus_exclude_labels"] = "record_id group_id"
|
|
185
|
-
return settings
|
|
186
|
-
|
|
187
|
-
def test_metrics_excluded_labels(self):
|
|
188
|
-
headers = get_user_headers("aaa")
|
|
189
|
-
self.app.put("/buckets/bid", headers=headers)
|
|
190
|
-
self.app.put("/buckets/bid/collections/cid", headers=headers)
|
|
191
|
-
self.app.put("/buckets/bid/groups/gid", headers=headers)
|
|
192
|
-
self.app.put("/buckets/bid/collections/cid/records/rid", headers=headers)
|
|
193
|
-
|
|
194
|
-
resp = self.app.get("/__metrics__")
|
|
195
|
-
|
|
196
|
-
self.assertNotIn("group_id=", resp.text)
|
|
197
|
-
self.assertNotIn("record_id=", resp.text)
|
|
198
|
-
self.assertIn(
|
|
199
|
-
'kintoprod_request_size_count{bucket_id="bid",collection_id="",endpoint="group-object"}',
|
|
200
|
-
resp.text,
|
|
201
|
-
)
|
|
202
|
-
self.assertIn(
|
|
203
|
-
'kintoprod_request_size_count{bucket_id="bid",collection_id="cid",endpoint="record-object"}',
|
|
204
|
-
resp.text,
|
|
205
|
-
)
|
|
@@ -31,13 +31,13 @@ class ViewsMetricsTest(BaseWebTest, unittest.TestCase):
|
|
|
31
31
|
self.app.get("/buckets/beers/collections/barley/records", headers=self.headers)
|
|
32
32
|
|
|
33
33
|
resp = self.app.get("/__metrics__")
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
self.assertIn(
|
|
36
|
-
'request_size_sum{bucket_id="beers",collection_id="",endpoint="bucket-object",group_id="",record_id=""}',
|
|
36
|
+
'request_size_sum{bucket_id="beers",collection_id="",endpoint="bucket-object",group_id="",method="put",record_id="",status="201"}',
|
|
37
37
|
resp.text,
|
|
38
38
|
)
|
|
39
39
|
self.assertIn(
|
|
40
|
-
'request_size_sum{bucket_id="beers",collection_id="",endpoint="group-object",group_id="amateurs",record_id=""}',
|
|
40
|
+
'request_size_sum{bucket_id="beers",collection_id="",endpoint="group-object",group_id="amateurs",method="put",record_id="",status="201"}',
|
|
41
41
|
resp.text,
|
|
42
42
|
)
|
|
43
43
|
self.assertIn(
|
|
@@ -45,7 +45,7 @@ class ViewsMetricsTest(BaseWebTest, unittest.TestCase):
|
|
|
45
45
|
resp.text,
|
|
46
46
|
)
|
|
47
47
|
self.assertIn(
|
|
48
|
-
'request_duration_sum{bucket_id="beers",collection_id="barley",endpoint="record-object",group_id="",method="put",record_id="abc"}',
|
|
48
|
+
'request_duration_sum{bucket_id="beers",collection_id="barley",endpoint="record-object",group_id="",method="put",record_id="abc",status="201"}',
|
|
49
49
|
resp.text,
|
|
50
50
|
)
|
|
51
51
|
|
|
@@ -61,3 +61,13 @@ class ViewsMetricsTest(BaseWebTest, unittest.TestCase):
|
|
|
61
61
|
'request_summary_total{bucket_id="beers",collection_id="barley",endpoint="record-plural",group_id="",method="get",record_id="",status="200"}',
|
|
62
62
|
resp.text,
|
|
63
63
|
)
|
|
64
|
+
|
|
65
|
+
def test_4xx_do_not_have_matchdict_labels_values(self):
|
|
66
|
+
self.app.get("/buckets/water", headers=self.headers, status=403)
|
|
67
|
+
|
|
68
|
+
resp = self.app.get("/__metrics__")
|
|
69
|
+
|
|
70
|
+
self.assertIn(
|
|
71
|
+
'request_summary_total{bucket_id="",collection_id="",endpoint="bucket-object",group_id="",method="get",record_id="",status="403"}',
|
|
72
|
+
resp.text,
|
|
73
|
+
)
|
|
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
|
|
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
|