@@ -301,6 +301,83 @@ hello view <api-utilities>`.
301
301
# kinto.http_host = production.server.com:7777
302
302
303
303
304
+ .. _configuration-plugins :
305
+
306
+ Plugins
307
+ =======
308
+
309
+ It is possible to extend the default Kinto behaviors by using "plugins".
310
+
311
+ The list of plugins to load at startup can be specified in the settings, as a
312
+ list of Python modules:
313
+
314
+ .. code-block :: ini
315
+
316
+ kinto.includes = kinto.plugins.default_bucket
317
+ kinto.plugins.history
318
+ kinto.plugins.admin
319
+ kinto-attachment
320
+ custom-myplugin
321
+
322
+ +---------------------------------------+--------------------------------------------------------------------------+
323
+ | Built-in plugins | What does it do? |
324
+ +=======================================+==========================================================================+
325
+ | ``kinto.plugins.accounts `` | It allows users to sign-up and authenticate using username and password |
326
+ | | (:ref: `more details <api-accounts >`). |
327
+ +---------------------------------------+--------------------------------------------------------------------------+
328
+ | ``kinto.plugins.admin `` | It is a Web admin UI to manage data from a Kinto server. |
329
+ | | (:ref: `more details <kinto-admin >`). |
330
+ +---------------------------------------+--------------------------------------------------------------------------+
331
+ | ``kinto.plugins.default_bucket `` | It enables a personal bucket ``default ``, where collections are created |
332
+ | | implicitly (:ref: `more details <buckets-default-id >`). |
333
+ +---------------------------------------+--------------------------------------------------------------------------+
334
+ | ``kinto.plugins.flush `` | Adds an endpoint to completely remove all data from the database backend |
335
+ | | for testing/staging purposes. (:ref: `more details <api-flush >`). |
336
+ +---------------------------------------+--------------------------------------------------------------------------+
337
+ | ``kinto.plugins.history `` | It tracks every action performed on objects within a bucket |
338
+ | | (:ref: `more details <api-history >`). |
339
+ +---------------------------------------+--------------------------------------------------------------------------+
340
+ | ``kinto.plugins.openid `` | It allows to authenticate users using OpenID Connect from Google, |
341
+ | | Microsoft, Auth0, etc. (:ref: `more details <api-openid >`). |
342
+ +---------------------------------------+--------------------------------------------------------------------------+
343
+ | ``kinto.plugins.quotas `` | It allows to limit storage per collection size, number of records, etc. |
344
+ | | (:ref: `more details <api-quotas >`). |
345
+ +---------------------------------------+--------------------------------------------------------------------------+
346
+ | ``kinto.plugins.prometheus `` | Send metrics about backend duration, authentication, endpoints hits, .. |
347
+ | | (:ref: `more details <monitoring-with-prometheus >`). |
348
+ +---------------------------------------+--------------------------------------------------------------------------+
349
+ | ``kinto.plugins.statsd `` | Send metrics about backend duration, authentication, endpoints hits, .. |
350
+ | | (:ref: `more details <monitoring-with-statsd >`). |
351
+ +---------------------------------------+--------------------------------------------------------------------------+
352
+
353
+
354
+ There are `many available packages `_ in the Pyramid ecosystem, and it is straightforward to build one,
355
+ since the specified module must just define an ``includeme(config) `` function.
356
+
357
+ .. _many available packages : https://github.com/ITCase/awesome-pyramid
358
+
359
+ See `our list of community plugins <https://github.com/Kinto/kinto/wiki/Plugins >`_.
360
+
361
+ See also: :ref: `tutorial-write-plugin ` for more in-depth informations on how
362
+ to create your own plugin.
363
+
364
+
365
+ Pluggable components
366
+ ::::::::::::::::::::
367
+
368
+ :term: `Pluggable <pluggable> ` components can be substituted from configuration files,
369
+ as long as the replacement follows the original component API.
370
+
371
+ .. code-block :: ini
372
+
373
+ kinto.logging_renderer = your_log_renderer.CustomRenderer
374
+
375
+ This is the simplest way to extend *Kinto *, but will be limited to its
376
+ existing components (cache, storage, log renderer, ...).
377
+
378
+ In order to add extra features, including external packages is the way to go!
379
+
380
+
304
381
Logging and Monitoring
305
382
======================
306
383
@@ -413,13 +490,33 @@ Or the equivalent environment variables:
413
490
The application sends an event on startup (mainly for setup check).
414
491
415
492
493
+ .. _monitoring-with-prometheus :
494
+
495
+ Monitoring with Prometheus
496
+ ::::::::::::::::::::::::::
497
+
498
+ Requires the ``prometheus-client `` package (installed with ``kinto[monitoring] ``).
499
+
500
+ Prometheus metrics can be enabled with (disabled by default):
501
+
502
+ .. code-block :: ini
503
+
504
+ kinto.includes = kinto.plugins.prometheus
505
+
506
+ Metrics can then be crawled from the ``/__metrics__ `` endpoint.
507
+
508
+
416
509
.. _monitoring-with-statsd :
417
510
418
511
Monitoring with StatsD
419
512
::::::::::::::::::::::
420
513
421
514
Requires the ``statsd `` package.
422
515
516
+ .. note ::
517
+
518
+ Only one of *Prometheus * and *StatsD * can be enabled. It will take precedence and the other one will be ignored.
519
+
423
520
+------------------------+----------------------------------------+--------------------------------------------------------------------------+
424
521
| Setting name | Default | What does it do? |
425
522
+========================+========================================+==========================================================================+
@@ -475,80 +572,6 @@ New Relic can be enabled (disabled by default):
475
572
kinto.newrelic_env = prod
476
573
477
574
478
- .. _configuration-plugins :
479
-
480
- Plugins
481
- =======
482
-
483
- It is possible to extend the default Kinto behaviors by using "plugins".
484
-
485
- The list of plugins to load at startup can be specified in the settings, as a
486
- list of Python modules:
487
-
488
- .. code-block :: ini
489
-
490
- kinto.includes = kinto.plugins.default_bucket
491
- kinto.plugins.history
492
- kinto.plugins.admin
493
- kinto-attachment
494
- custom-myplugin
495
-
496
- +---------------------------------------+--------------------------------------------------------------------------+
497
- | Built-in plugins | What does it do? |
498
- +=======================================+==========================================================================+
499
- | ``kinto.plugins.accounts `` | It allows users to sign-up and authenticate using username and password |
500
- | | (:ref: `more details <api-accounts >`). |
501
- +---------------------------------------+--------------------------------------------------------------------------+
502
- | ``kinto.plugins.admin `` | It is a Web admin UI to manage data from a Kinto server. |
503
- | | (:ref: `more details <kinto-admin >`). |
504
- +---------------------------------------+--------------------------------------------------------------------------+
505
- | ``kinto.plugins.default_bucket `` | It enables a personal bucket ``default ``, where collections are created |
506
- | | implicitly (:ref: `more details <buckets-default-id >`). |
507
- +---------------------------------------+--------------------------------------------------------------------------+
508
- | ``kinto.plugins.flush `` | Adds an endpoint to completely remove all data from the database backend |
509
- | | for testing/staging purposes. (:ref: `more details <api-flush >`). |
510
- +---------------------------------------+--------------------------------------------------------------------------+
511
- | ``kinto.plugins.history `` | It tracks every action performed on objects within a bucket |
512
- | | (:ref: `more details <api-history >`). |
513
- +---------------------------------------+--------------------------------------------------------------------------+
514
- | ``kinto.plugins.openid `` | It allows to authenticate users using OpenID Connect from Google, |
515
- | | Microsoft, Auth0, etc. (:ref: `more details <api-openid >`). |
516
- +---------------------------------------+--------------------------------------------------------------------------+
517
- | ``kinto.plugins.quotas `` | It allows to limit storage per collection size, number of records, etc. |
518
- | | (:ref: `more details <api-quotas >`). |
519
- +---------------------------------------+--------------------------------------------------------------------------+
520
- | ``kinto.plugins.statsd `` | Send metrics about backend duration, authentication, endpoints hits, .. |
521
- | | (:ref: `more details <monitoring-with-statsd >`). |
522
- +---------------------------------------+--------------------------------------------------------------------------+
523
-
524
-
525
- There are `many available packages `_ in Pyramid ecosystem, and it is straightforward to build one,
526
- since the specified module must just define an ``includeme(config) `` function.
527
-
528
- .. _many available packages : https://github.com/ITCase/awesome-pyramid
529
-
530
- See `our list of community plugins <https://github.com/Kinto/kinto/wiki/Plugins >`_.
531
-
532
- See also: :ref: `tutorial-write-plugin ` for more in-depth informations on how
533
- to create your own plugin.
534
-
535
-
536
- Pluggable components
537
- ::::::::::::::::::::
538
-
539
- :term: `Pluggable <pluggable> ` components can be substituted from configuration files,
540
- as long as the replacement follows the original component API.
541
-
542
- .. code-block :: ini
543
-
544
- kinto.logging_renderer = your_log_renderer.CustomRenderer
545
-
546
- This is the simplest way to extend *Kinto *, but will be limited to its
547
- existing components (cache, storage, log renderer, ...).
548
-
549
- In order to add extra features, including external packages is the way to go!
550
-
551
-
552
575
.. _configuration-authentication :
553
576
554
577
Authentication
0 commit comments