Skip to content

Commit e62ee05

Browse files
committed
Add documentation about data collectors late collect
1 parent 903b1b4 commit e62ee05

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

profiler/data_collector.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ request::
7979
:doc:`/testing/profiling`) so it's recommended to return a string which is
8080
short, lowercase and without white spaces.
8181

82+
Note that the data collect is triggered belatedly during the :ref:`kernel.response` event. If you need to collect data that is only available
83+
later, you should implement :class:`Symfony\\Component\\HttpKernel\\DataCollector\\LateDataCollectorInterface` and its :method:`Symfony\\Component\\HttpKernel\\DataCollector\\LateDataCollectorInterface::lateCollect` method which is invoked just before
84+
the profiler data serialization (during :ref:`kernel.terminate` phase).
85+
8286
.. _data_collector_tag:
8387

8488
Enabling Custom Data Collectors

0 commit comments

Comments
 (0)