Skip to content

Commit

Permalink
Update core and alter docs for log+drop behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
cretz committed Sep 29, 2023
1 parent dd301cd commit 2f751de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion temporalio/bridge/sdk-core
14 changes: 7 additions & 7 deletions temporalio/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,18 +183,18 @@ class MetricBuffer:
metrics instead of ignoring/exporting them.
.. warning::
It is very important that the buffer size is set to a high number and
that :py:meth:`retrieve_updates` is called regularly. Metric updates
will not be lost, so they can cause the system to halt if there is not
enough room in the buffer.
It is important that the buffer size is set to a high number and that
:py:meth:`retrieve_updates` is called regularly to drain the buffer. If
the buffer is full, metric updates will be dropped and an error will be
logged.
"""

def __init__(self, buffer_size: int) -> None:
"""Create a buffer with the given size.
.. warning::
It is very important that the buffer size is set to a high number
and is drained regularly. See :py:class:`MetricBuffer` warning.
It is important that the buffer size is set to a high number and is
drained regularly. See :py:class:`MetricBuffer` warning.
Args:
buffer_size: Size of the buffer. Set this to a large value. A value
Expand All @@ -207,7 +207,7 @@ def retrieve_updates(self) -> Sequence[BufferedMetricUpdate]:
"""Drain the buffer and return all metric updates.
.. warning::
It is very important that this is called regularly. See
It is important that this is called regularly. See
:py:class:`MetricBuffer` warning.
Returns:
Expand Down

0 comments on commit 2f751de

Please sign in to comment.