[OpenSIPS-Devel] [OpenSIPS/opensips] c549e6: [rest_client] trace rest requests and replies

ionutrazvanionita ionutionita at opensips.org
Fri Feb 17 10:04:27 EST 2017


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: c549e6ec04dd835315dd7134650e30d17309407d
      https://github.com/OpenSIPS/opensips/commit/c549e6ec04dd835315dd7134650e30d17309407d
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M modules/proto_hep/hep.c
    M modules/rest_client/rest_client.c
    M modules/rest_client/rest_methods.c
    M modules/rest_client/rest_methods.h

  Log Message:
  -----------
  [rest_client] trace rest requests and replies


  Commit: 36c698d3a155d9a8c89e4fd5015f6c3f8f5e0be0
      https://github.com/OpenSIPS/opensips/commit/36c698d3a155d9a8c89e4fd5015f6c3f8f5e0be0
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M modules/proto_hep/Makefile
    A modules/proto_hep/cJSON/cJSON.c
    A modules/proto_hep/cJSON/cJSON.h

  Log Message:
  -----------
  [proto_hep] include cJSON library in proto_hep


  Commit: 158cc0645b93212cc4a7ce1155df36765d0276af
      https://github.com/OpenSIPS/opensips/commit/158cc0645b93212cc4a7ce1155df36765d0276af
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M trace_api.h

  Log Message:
  -----------
  [trace_api] export functions for adding HOMER6 compliant data

	* export function to add multiple payloads, leaving
the impelemnting protocol to decide how to format this data;
	* export function to add multiple correlations, except
from the protocol's correlation id;
	* sip_context_trace function now leaves the possibility
to have a function in which the user can modify the message;


  Commit: b02e59557bfbe8a6a0daf358afc42ad8d9f35f67
      https://github.com/OpenSIPS/opensips/commit/b02e59557bfbe8a6a0daf358afc42ad8d9f35f67
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M modules/proto_hep/hep.c
    M modules/proto_hep/hep.h

  Log Message:
  -----------
  [proto_hep] implement new trace api functions formatting to JSON

	Users can now add multiple payloads and correlations using
the new functions from trace_api, which in proto_hep will be
added as JSON objects.


  Commit: 9d5d45525336759712782785b3512227651971af
      https://github.com/OpenSIPS/opensips/commit/9d5d45525336759712782785b3512227651971af
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M modules/siptrace/siptrace.c
    M modules/siptrace/siptrace.h

  Log Message:
  -----------
  [siptrace] add data to message callback and sip payload as JSON

	* sip_context_trace function now exports a function which
will give access to the trace_message structure and users will
be able to add/remove headers as they wish;
	* sip message is now saved as JSON in the HEP message;


  Commit: ad793eabec7792de347038e0a706dc26add0a8df
      https://github.com/OpenSIPS/opensips/commit/ad793eabec7792de347038e0a706dc26add0a8df
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M xlog.c
    M xlog.h

  Log Message:
  -----------
  [xlog] add trace message payload as JSON


  Commit: d4bb33c5732de2e41eea2c93ac71ca7e3af8a2e6
      https://github.com/OpenSIPS/opensips/commit/d4bb33c5732de2e41eea2c93ac71ca7e3af8a2e6
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M mi/mi_trace.c
    M mi/mi_trace.h

  Log Message:
  -----------
  [mi] add mi trace payload as JSON


  Commit: aa17f82ec451ad08c5e4d784c1bfe3543d60500c
      https://github.com/OpenSIPS/opensips/commit/aa17f82ec451ad08c5e4d784c1bfe3543d60500c
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M modules/rest_client/rest_methods.c
    M modules/rest_client/rest_methods.h

  Log Message:
  -----------
  [rest_client] add rest trace message payload as JSON


  Commit: 50197c741819de50f2c280243cd631fd166571a2
      https://github.com/OpenSIPS/opensips/commit/50197c741819de50f2c280243cd631fd166571a2
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    A modules/proto_hep/cJSON.c
    A modules/proto_hep/cJSON.h
    R modules/proto_hep/cJSON/cJSON.c
    R modules/proto_hep/cJSON/cJSON.h
    M modules/proto_hep/hep.c

  Log Message:
  -----------
  [proto_hep] fix json funcs file inclusions


  Commit: 23144403a50098bfb4d442c9ee2c1426a6465c8f
      https://github.com/OpenSIPS/opensips/commit/23144403a50098bfb4d442c9ee2c1426a6465c8f
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M modules/proto_hep/hep.c
    M modules/proto_hep/hep.h
    M modules/proto_hep/proto_hep.c
    M trace_api.h

  Log Message:
  -----------
  [trace_api][proto_hep] Add unique id generator function

	Trace api exports a function which should generate an
unique id in space/context ( process ) and time.
	Proto_hep implements this function based on process id,
current time in seconds and miliseconds and some random value.


  Commit: d1845ca3d607f30019dce6af08775af1ae48084a
      https://github.com/OpenSIPS/opensips/commit/d1845ca3d607f30019dce6af08775af1ae48084a
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M mi/mi_trace.c

  Log Message:
  -----------
  [mi] use global id generator func for correlation


  Commit: 26cf1464846c3b2023a4b7f581125d40a65ba52b
      https://github.com/OpenSIPS/opensips/commit/26cf1464846c3b2023a4b7f581125d40a65ba52b
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M modules/proto_hep/hep.c

  Log Message:
  -----------
  [proto_hep] fix extra correlation logic


  Commit: 6937577813c2912bb7da0e2baf5106d06b53f971
      https://github.com/OpenSIPS/opensips/commit/6937577813c2912bb7da0e2baf5106d06b53f971
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M xlog.c

  Log Message:
  -----------
  [xlog] change correlation logic

	* each xlog packet will have it's own correlation id and
and extra sip correlation id, which will be added to a new header;


  Commit: a823cb61cec9402326abfa8374fc879d9146ec1e
      https://github.com/OpenSIPS/opensips/commit/a823cb61cec9402326abfa8374fc879d9146ec1e
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M modules/rest_client/rest_methods.c
    M modules/rest_client/rest_methods.h

  Log Message:
  -----------
  [rest_client] change correlation logic

	Rest client now has 2 correlation id:

	* the main correlation id in the correlation header which
stores a rest correlation link the request with the reply;
	* an additional sip correlation in the external correlation
header storing the sip callid;


  Commit: 26413cb631c58419999df1d3a85d642d92dced6e
      https://github.com/OpenSIPS/opensips/commit/26413cb631c58419999df1d3a85d642d92dced6e
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M mi/mi_trace.c
    M mi/mi_trace.h
    M modules/proto_hep/hep.c
    M modules/proto_hep/proto_hep.c
    M modules/rest_client/rest_methods.c
    M modules/siptrace/siptrace.c
    M trace_api.h
    M xlog.c
    M xlog.h

  Log Message:
  -----------
  added Homer 5 compatibility; extra data params as str function args

	* opensips now offers compatibility with HOMER5; there
is a module parameter in proto_hep which allows falling back
to HOMER5 logic along with a delimiter parameter which shall be
put between multiple payloads in a message;
	* add_trace_payload and add_trace_correlation functions
were recieving char* as parameter; this was because json library
functions which does not have opensips str based functions; but
since having a char* as a parameter needed a lot of workarounds
since the software is mostly str based, we decided that all
the memory allocation logic in order to be able to have null
terminated strings should be inside add_trace_payload and
add_trace_correlation functions;


  Commit: 82b215fa1797a15aa1b4cc0d2f34afcaadbfac27
      https://github.com/OpenSIPS/opensips/commit/82b215fa1797a15aa1b4cc0d2f34afcaadbfac27
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M mi/mi_trace.c
    M modules/proto_hep/hep.c
    M modules/proto_hep/proto_hep.c
    M modules/rest_client/rest_methods.c
    M modules/siptrace/siptrace.c
    M trace_api.h
    M xlog.c

  Log Message:
  -----------
  change trace_api function names for better understanding


  Commit: 41199667d6231aed9851fe6f5bb6bbe45ae907e8
      https://github.com/OpenSIPS/opensips/commit/41199667d6231aed9851fe6f5bb6bbe45ae907e8
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M mi/mi_trace.c
    M modules/proto_hep/hep.c
    M modules/rest_client/rest_methods.c
    M modules/siptrace/siptrace.c
    M xlog.c

  Log Message:
  -----------
  [hep] allow having messages without payload


  Commit: e59a43db73262ff7b4976915f3a3ac158dc1f04a
      https://github.com/OpenSIPS/opensips/commit/e59a43db73262ff7b4976915f3a3ac158dc1f04a
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M modules/sipcapture/sipcapture.c

  Log Message:
  -----------
  [sipcapture] fix crash if hep3 message has no payload


  Commit: a5cc747de85cb47dadbc30dfd254c485a31745bb
      https://github.com/OpenSIPS/opensips/commit/a5cc747de85cb47dadbc30dfd254c485a31745bb
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M xlog.c

  Log Message:
  -----------
  [xlog] callid as both primary correlation and extra correlation


  Commit: bdd127da6fa9a97e7df4098dad7abddacb185769
      https://github.com/OpenSIPS/opensips/commit/bdd127da6fa9a97e7df4098dad7abddacb185769
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M mi/mi_trace.c
    M modules/proto_hep/hep.c
    M modules/rest_client/rest_methods.c
    M trace_api.h

  Log Message:
  -----------
  [trace_api] modify guid generation algorithm; change gid to guid

	* global unique id is now generated based on internally
stored pid, opensips start time, ujiffies and one random value;
	* also changed generate_gid function name to generate_guid;


  Commit: ab4f39a4a520b5af02e076ec0237e00912c0456f
      https://github.com/OpenSIPS/opensips/commit/ab4f39a4a520b5af02e076ec0237e00912c0456f
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M mi/mi_trace.c
    M modules/proto_hep/hep.c
    M modules/proto_hep/proto_hep.c
    M modules/rest_client/rest_methods.c
    M xlog.c

  Log Message:
  -----------
  [proto_hep] internally set local address if dest/src is null


  Commit: 182b809b1c4768cf91d6362262d5295ed3c2ebb4
      https://github.com/OpenSIPS/opensips/commit/182b809b1c4768cf91d6362262d5295ed3c2ebb4
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M modules/rest_client/rest_methods.c
    M modules/rest_client/rest_methods.h

  Log Message:
  -----------
  [rest_client] better performance for rest tracing

	* don't try to resolve url to get traced ip address; get
it dirrectly from libcurl; this way we save time and have more
accurate information about local ip and port;


  Commit: 7b94578994c60110bc03d04f55173d09a56190ad
      https://github.com/OpenSIPS/opensips/commit/7b94578994c60110bc03d04f55173d09a56190ad
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M modules/proto_hep/cJSON.c
    M modules/proto_hep/cJSON.h
    M modules/proto_hep/hep.c

  Log Message:
  -----------
  [proto_hep] exported str based function from cJSON

	* cJSON did not export any str based function (char * +
len); in order to solve this a new function for str's was added
in cJSON which accepts values in char* + len form, not neccesarily
null terminated;
	* used the newly added function in proto_hep module;


  Commit: 86d1eaa2993f443cb44aeae8130b7e88abfc3aa8
      https://github.com/OpenSIPS/opensips/commit/86d1eaa2993f443cb44aeae8130b7e88abfc3aa8
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M modules/rest_client/rest_methods.c

  Log Message:
  -----------
  [rest_client] fix trace data length


  Commit: 728eb45dcb3540570857a6776d0fbdba2fc5714f
      https://github.com/OpenSIPS/opensips/commit/728eb45dcb3540570857a6776d0fbdba2fc5714f
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M modules/proto_hep/cJSON.c

  Log Message:
  -----------
  [proto_hep][cJSON] null terminate strndup copied string


  Commit: c9d48a29ef2530e1719c3aa2213dfd7ea30d0950
      https://github.com/OpenSIPS/opensips/commit/c9d48a29ef2530e1719c3aa2213dfd7ea30d0950
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M modules/siptrace/siptrace.c

  Log Message:
  -----------
  [siptrace] add callid as correlation id to sip message


Compare: https://github.com/OpenSIPS/opensips/compare/584799b94db7...c9d48a29ef25


More information about the Devel mailing list