-/*
- * Trigger the regeneration of the metadata for a session.
- * The new metadata overwrite the previous one locally or remotely (through
- * the lttng-relayd). Only kernel, per-uid and non-live sessions are supported.
- * Return 0 on success, a negative LTTng error code on error.
- */
+/*!
+@brief
+ Regenerates the metadata streams of the recording session named
+ \lt_p{session_name}.
+
+@ingroup api_session
+
+Use this function to resample the offset between the monotonic clock and
+the wall time of the system, and then regenerate (overwrite) all the
+metadata stream files (local or remote) of the recording session
+named \lt_p{session_name}.
+
+More specifically, you may want to resample the wall time following a
+major <a href="https://en.wikipedia.org/wiki/Network_Time_Protocol">NTP</a>
+correction. As such, LTTng can trace a system booting with an incorrect
+wall time before its wall time is NTP-corrected. Regenerating the
+metadata of a recording session ensures that trace readers
+can accurately determine the event record timestamps relative to the
+Unix epoch.
+
+Note that if you plan to \ref api_session_rotation "rotate" the
+recording session named \lt_p{session_name}, this function only
+regenerates the metadata stream files of the \em current and \em next
+trace chunks.
+
+See the preconditions of this function which show important limitations.
+
+@param[in] session_name
+ Name of the recording session of which to regenerate the metadata
+ streams.
+
+@returns
+ 0 on success, or a \em negative #lttng_error_code enumerator
+ otherwise.
+
+@lt_pre_conn
+@lt_pre_not_null{session_name}
+@lt_pre_sess_exists{session_name}
+@pre
+ The recording session named \lt_p{session_name} was \em not created
+ in \ref api-session-live-mode "live mode".
+@pre
+ All the \ref api-channel-channel "channels" of the recording session
+ named \lt_p{session_name} use a
+ \ref api-channel-per-user-buf "per-user buffering scheme".
+
+@sa lttng_regenerate_statedump() --
+ Regenerates the state dump event records of a recording session.
+@sa \lt_man{lttng-regenerate,1}
+*/