relayd: Add backward compatibility for --group-output-by-session
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 19 Sep 2019 20:56:53 +0000 (16:56 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 8 Nov 2019 22:55:06 +0000 (17:55 -0500)
commit2a635488acf0c56ffb9b66c57f6bf97a95c53be6
tree17ebdac3d9fa1d5442739cd4e67e67160723e051
parenta9115ebf4fb48f4a0e81a97384c9ace7df219926
relayd: Add backward compatibility for --group-output-by-session

The current implementation works for producer (consumerd/lttng-sessiond)
using protocol version >= 2.11.

For producer using protocol version >= 2.4 and < 2.11, we can use the
session name passed on the RELAYD_CREATE_SESSION command to infer
information (creation datetime, base path) from the stream path passed on
the RELAYD_ADD_STREAM command. That information is then used to craft a
stream path, in a best effort manner, that comply with the
--group-output-by-session requirements:

  <session_name>/<hostname>-<datetime>/trace

Prior to protocol version 2.4, the session name is unknown on lttng-relayd
side. In those cases, we do not perform any transformation and leave the
provided stream path as is. A warning (lttng-relayd) is emitted on such
occasions.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/Makefile.am
src/bin/lttng-relayd/backward-compatibility-group-by.c [new file with mode: 0644]
src/bin/lttng-relayd/backward-compatibility-group-by.h [new file with mode: 0644]
src/bin/lttng-relayd/main.c
This page took 0.026237 seconds and 4 git commands to generate.