Diffusion C API 6.12.1
Loading...
Searching...
No Matches

Files

file  session.h
 Functions relating to a session and session management.

Data Structures

struct  diffusion_metrics_put_session_metric_collector_params_s
 Structure supplied when issuing a diffusion_metrics_put_session_metric_collector call. More...
struct  diffusion_metrics_put_topic_metric_collector_params_s
 Structure supplied when issuing a diffusion_metrics_put_topic_metric_collector call. More...
struct  diffusion_metrics_remove_session_metric_collector_params_s
 Structure supplied when issuing a diffusion_metrics_remove_session_metric_collector call. More...
struct  diffusion_metrics_remove_topic_metric_collector_params_s
 Structure supplied when issuing a diffusion_metrics_remove_topic_metric_collector call. More...
struct  diffusion_metrics_list_session_metric_collectors_params_s
 Structure supplied when issuing a diffusion_metrics_list_session_metric_collectors call. More...
struct  diffusion_metrics_list_topic_metric_collectors_params_s
 Structure supplied when issuing a diffusion_metrics_list_topic_metric_collectors call. More...

Typedefs

typedef struct DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T
 Opaque Session Metric Collector Builder struct.
typedef struct DIFFUSION_SESSION_METRIC_COLLECTOR_T DIFFUSION_SESSION_METRIC_COLLECTOR_T
 Opaque Session Metric Collector struct.
typedef struct DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T
 Opaque Topic Metric Collector Builder struct.
typedef struct DIFFUSION_TOPIC_METRIC_COLLECTOR_T DIFFUSION_TOPIC_METRIC_COLLECTOR_T
 Opaque Topic Metric Collector struct.
typedef int(* session_metric_collector_put_cb) (void *context)
 callback when a session metric collector has been set on the server.
typedef int(* session_metric_collector_remove_cb) (void *context)
 callback when a session metric collector has been removed from the server.
typedef int(* session_metric_collector_list_cb) (const LIST_T *session_metric_collectors, void *context)
 callback when the list of session metric collectors has been retrieved from the server.
typedef int(* topic_metric_collector_put_cb) (void *context)
 callback when a topic metric collector has been set on the server.
typedef int(* topic_metric_collector_remove_cb) (void *context)
 callback when a topic metric collector has been removed from the server.
typedef int(* topic_metric_collector_list_cb) (const LIST_T *topic_metric_collectors, void *context)
 callback when the list of topic metric collectors has been retrieved from the server.
typedef struct diffusion_metrics_put_session_metric_collector_params_s DIFFUSION_METRICS_PUT_SESSION_METRIC_COLLECTOR_PARAMS_T
 Structure supplied when issuing a diffusion_metrics_put_session_metric_collector call.
typedef struct diffusion_metrics_put_topic_metric_collector_params_s DIFFUSION_METRICS_PUT_TOPIC_METRIC_COLLECTOR_PARAMS_T
 Structure supplied when issuing a diffusion_metrics_put_topic_metric_collector call.
typedef struct diffusion_metrics_remove_session_metric_collector_params_s DIFFUSION_METRICS_REMOVE_SESSION_METRIC_COLLECTOR_PARAMS_T
 Structure supplied when issuing a diffusion_metrics_remove_session_metric_collector call.
typedef struct diffusion_metrics_remove_topic_metric_collector_params_s DIFFUSION_METRICS_REMOVE_TOPIC_METRIC_COLLECTOR_PARAMS_T
 Structure supplied when issuing a diffusion_metrics_remove_topic_metric_collector call.
typedef struct diffusion_metrics_list_session_metric_collectors_params_s DIFFUSION_METRICS_LIST_SESSION_METRIC_COLLECTORS_PARAMS_T
 Structure supplied when issuing a diffusion_metrics_list_session_metric_collectors call.
typedef struct diffusion_metrics_list_topic_metric_collectors_params_s DIFFUSION_METRICS_LIST_TOPIC_METRIC_COLLECTORS_PARAMS_T
 Structure supplied when issuing a diffusion_metrics_list_topic_metric_collectors call.

Functions

DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_Tdiffusion_session_metric_collector_builder_init ()
 Initialize a new session metric collector builder.
DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_Tdiffusion_session_metric_collector_builder_reset (DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T *builder)
 Reset the session metric collector builder's internal values.
DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_Tdiffusion_session_metric_collector_builder_export_to_prometheus (DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T *builder, bool export_to_prometheus)
 Specifies whether the metric collector should export metrics to Prometheus or not.
DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_Tdiffusion_session_metric_collector_builder_maximum_groups (DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T *builder, int limit)
 Set the maximum number of groups maintained by the metric collector.
DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_Tdiffusion_session_metric_collector_builder_group_by_property (DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T *builder, char *property_name)
 Adds the name of a session property to group by to the list known to this builder.
DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_Tdiffusion_session_metric_collector_builder_group_by_properties (DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T *builder, LIST_T *property_names)
 Specifies a list of session property names to group by, replacing any current list known to this builder.
DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_Tdiffusion_session_metric_collector_builder_remove_metrics_with_no_matches (DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T *builder, bool remove)
 Specifies whether the metric collector should remove any metrics that have no matches.
void diffusion_session_metric_collector_builder_free (DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T *builder)
 Free a session metric collector builder.
void diffusion_session_metric_collector_free (DIFFUSION_SESSION_METRIC_COLLECTOR_T *collector)
 Free a session metric collector.
bool diffusion_session_metric_collector_get_session_filter (DIFFUSION_SESSION_METRIC_COLLECTOR_T *collector, char **session_filter)
 Returns the session filter of the session metric collector.
bool diffusion_session_metric_collector_get_name (DIFFUSION_SESSION_METRIC_COLLECTOR_T *collector, char **name)
 Returns the name of the session metric collector.
bool diffusion_session_metric_collector_removes_metrics_with_no_matches (DIFFUSION_SESSION_METRIC_COLLECTOR_T *collector, bool *removes)
 Indicates whether metrics with no matches should be removed.
bool diffusion_session_metric_collector_exports_to_prometheus (DIFFUSION_SESSION_METRIC_COLLECTOR_T *collector, bool *exports_to_prometheus)
 Indicates whether the metric collector exports to Prometheus.
bool diffusion_session_metric_collector_maximum_groups (DIFFUSION_SESSION_METRIC_COLLECTOR_T *collector, int *maximum_groups)
 Limit the number of groups maintained by this metric collector.
bool diffusion_session_metric_collector_get_group_by_properties (DIFFUSION_SESSION_METRIC_COLLECTOR_T *collector, LIST_T **group_by)
 Returns the list of properties to group by.
bool diffusion_session_metric_collector_compare (DIFFUSION_SESSION_METRIC_COLLECTOR_T *collector_1, DIFFUSION_SESSION_METRIC_COLLECTOR_T *collector_2)
 Compares two session metric collectors.
DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_Tdiffusion_topic_metric_collector_builder_init ()
 Initialize a new topic metric collector builder.
DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_Tdiffusion_topic_metric_collector_builder_reset (DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T *builder)
 Reset the topic metric collector builder's internal values.
DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_Tdiffusion_topic_metric_collector_builder_export_to_prometheus (DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T *builder, bool export_to_prometheus)
 Specifies whether the metric collector should export metrics to Prometheus or not.
DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_Tdiffusion_topic_metric_collector_builder_maximum_groups (DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T *builder, int limit)
 Set the maximum number of groups maintained by the metric collector.
DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_Tdiffusion_topic_metric_collector_builder_group_by_topic_type (DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T *builder, bool group_by_topic_type)
 Specifies whether the metric collector should group by topic type.
DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_Tdiffusion_topic_metric_collector_builder_group_by_topic_view (DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T *builder, bool group_by_topic_view)
 Specifies whether the metric collector should group by topic view.
DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_Tdiffusion_topic_metric_collector_builder_group_by_path_prefix_parts (DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T *builder, int parts)
 Specifies the number of leading parts of the topic path the metric collector should use to group results.
DIFFUSION_TOPIC_METRIC_COLLECTOR_Tdiffusion_topic_metric_collector_builder_create (DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T *builder, char *name, char *topic_selector, DIFFUSION_API_ERROR *api_error)
 Create a new topic metric collector using the values currently known by the builder.
void diffusion_topic_metric_collector_builder_free (DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T *builder)
 Free a topic metric collector builder.
void diffusion_topic_metric_collector_free (DIFFUSION_TOPIC_METRIC_COLLECTOR_T *collector)
 Free a topic metric collector.
bool diffusion_topic_metric_collector_get_topic_selector (DIFFUSION_TOPIC_METRIC_COLLECTOR_T *collector, char **topic_selector)
 Returns the topic selector of the topic metric collector.
bool diffusion_topic_metric_collector_get_name (DIFFUSION_TOPIC_METRIC_COLLECTOR_T *collector, char **name)
 Returns the name of the topic metric collector.
bool diffusion_topic_metric_collector_groups_by_topic_type (DIFFUSION_TOPIC_METRIC_COLLECTOR_T *collector, bool *groups_by_topic_type)
 Specifies whether the metric collector should group by topic type.
bool diffusion_topic_metric_collector_groups_by_topic_view (DIFFUSION_TOPIC_METRIC_COLLECTOR_T *collector, bool *groups_by_topic_view)
 Indicates whether the metric collector groups by topic view.
bool diffusion_topic_metric_collector_group_by_path_prefix_parts (DIFFUSION_TOPIC_METRIC_COLLECTOR_T *collector, int *group_by_path_prefix_parts)
 Specifies the number of leading parts of the topic path to group by, or 0, if the collector does not group by path prefix.
bool diffusion_topic_metric_collector_exports_to_prometheus (DIFFUSION_TOPIC_METRIC_COLLECTOR_T *collector, bool *exports_to_prometheus)
 Indicates whether the metric collector exports to Prometheus.
bool diffusion_topic_metric_collector_maximum_groups (DIFFUSION_TOPIC_METRIC_COLLECTOR_T *collector, int *maximum_groups)
 Limit the number of groups maintained by this metric collector.
bool diffusion_topic_metric_collector_compare (DIFFUSION_TOPIC_METRIC_COLLECTOR_T *collector_1, DIFFUSION_TOPIC_METRIC_COLLECTOR_T *collector_2)
 Compares two topic metric collectors.
bool diffusion_metrics_put_session_metric_collector (SESSION_T *session, const DIFFUSION_METRICS_PUT_SESSION_METRIC_COLLECTOR_PARAMS_T params, DIFFUSION_API_ERROR *api_error)
 Add a session metric collector, replacing any with the same name.
bool diffusion_metrics_list_session_metric_collectors (SESSION_T *session, const DIFFUSION_METRICS_LIST_SESSION_METRIC_COLLECTORS_PARAMS_T params, DIFFUSION_API_ERROR *api_error)
 Retrieves the current session metric collectors.
bool diffusion_metrics_remove_session_metric_collector (SESSION_T *session, const DIFFUSION_METRICS_REMOVE_SESSION_METRIC_COLLECTOR_PARAMS_T params, DIFFUSION_API_ERROR *api_error)
 Removes any session metric collector with the given name, if it exists.
bool diffusion_metrics_put_topic_metric_collector (SESSION_T *session, const DIFFUSION_METRICS_PUT_TOPIC_METRIC_COLLECTOR_PARAMS_T params, DIFFUSION_API_ERROR *api_error)
 Add a topic metric collector, replacing any with the same name.
bool diffusion_metrics_list_topic_metric_collectors (SESSION_T *session, const DIFFUSION_METRICS_LIST_TOPIC_METRIC_COLLECTORS_PARAMS_T params, DIFFUSION_API_ERROR *api_error)
 Retrieves the current topic metric collectors.
bool diffusion_metrics_remove_topic_metric_collector (SESSION_T *session, const DIFFUSION_METRICS_REMOVE_TOPIC_METRIC_COLLECTOR_PARAMS_T params, DIFFUSION_API_ERROR *api_error)
 Removes any topic metric collector with the given name, if it exists.

Detailed Description

Typedef Documentation

◆ session_metric_collector_list_cb

typedef int(* session_metric_collector_list_cb) (const LIST_T *session_metric_collectors, void *context)

callback when the list of session metric collectors has been retrieved from the server.

Parameters
contextUser supplied context.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.

◆ session_metric_collector_put_cb

typedef int(* session_metric_collector_put_cb) (void *context)

callback when a session metric collector has been set on the server.

Parameters
contextUser supplied context.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.

◆ session_metric_collector_remove_cb

typedef int(* session_metric_collector_remove_cb) (void *context)

callback when a session metric collector has been removed from the server.

Parameters
contextUser supplied context.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.

◆ topic_metric_collector_list_cb

typedef int(* topic_metric_collector_list_cb) (const LIST_T *topic_metric_collectors, void *context)

callback when the list of topic metric collectors has been retrieved from the server.

Parameters
contextUser supplied context.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.

◆ topic_metric_collector_put_cb

typedef int(* topic_metric_collector_put_cb) (void *context)

callback when a topic metric collector has been set on the server.

Parameters
contextUser supplied context.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.

◆ topic_metric_collector_remove_cb

typedef int(* topic_metric_collector_remove_cb) (void *context)

callback when a topic metric collector has been removed from the server.

Parameters
contextUser supplied context.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.

Function Documentation

◆ diffusion_metrics_list_session_metric_collectors()

bool diffusion_metrics_list_session_metric_collectors ( SESSION_T * session,
const DIFFUSION_METRICS_LIST_SESSION_METRIC_COLLECTORS_PARAMS_T params,
DIFFUSION_API_ERROR * api_error )

Retrieves the current session metric collectors.

Parameters
sessionThe current session. If NULL, this function returns immediately.
paramsParameter structure describing the callbacks to be invoked.
api_errorPopulated on API error. Can be NULL.
Returns
true if the operation was successful. False, otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.

◆ diffusion_metrics_list_topic_metric_collectors()

bool diffusion_metrics_list_topic_metric_collectors ( SESSION_T * session,
const DIFFUSION_METRICS_LIST_TOPIC_METRIC_COLLECTORS_PARAMS_T params,
DIFFUSION_API_ERROR * api_error )

Retrieves the current topic metric collectors.

Parameters
sessionThe current session. If NULL, this function returns immediately.
paramsParameter structure describing the callbacks to be invoked.
api_errorPopulated on API error. Can be NULL.
Returns
true if the operation was successful. False, otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.

◆ diffusion_metrics_put_session_metric_collector()

bool diffusion_metrics_put_session_metric_collector ( SESSION_T * session,
const DIFFUSION_METRICS_PUT_SESSION_METRIC_COLLECTOR_PARAMS_T params,
DIFFUSION_API_ERROR * api_error )

Add a session metric collector, replacing any with the same name.

Parameters
sessionThe current session. If NULL, this function returns immediately.
paramsParameter structure describing the session metric collector and the callbacks to be invoked.
api_errorPopulated on API error. Can be NULL.
Returns
true if the operation was successful. False, otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.

◆ diffusion_metrics_put_topic_metric_collector()

bool diffusion_metrics_put_topic_metric_collector ( SESSION_T * session,
const DIFFUSION_METRICS_PUT_TOPIC_METRIC_COLLECTOR_PARAMS_T params,
DIFFUSION_API_ERROR * api_error )

Add a topic metric collector, replacing any with the same name.

Parameters
sessionThe current session. If NULL, this function returns immediately.
paramsParameter structure describing the topic metric collector and the callbacks to be invoked.
api_errorPopulated on API error. Can be NULL.
Returns
true if the operation was successful. False, otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.

◆ diffusion_metrics_remove_session_metric_collector()

bool diffusion_metrics_remove_session_metric_collector ( SESSION_T * session,
const DIFFUSION_METRICS_REMOVE_SESSION_METRIC_COLLECTOR_PARAMS_T params,
DIFFUSION_API_ERROR * api_error )

Removes any session metric collector with the given name, if it exists.

Parameters
sessionThe current session. If NULL, this function returns immediately.
paramsParameter structure describing the session metric collector name and the callbacks to be invoked.
api_errorPopulated on API error. Can be NULL.
Returns
true if the operation was successful. False, otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.

◆ diffusion_metrics_remove_topic_metric_collector()

bool diffusion_metrics_remove_topic_metric_collector ( SESSION_T * session,
const DIFFUSION_METRICS_REMOVE_TOPIC_METRIC_COLLECTOR_PARAMS_T params,
DIFFUSION_API_ERROR * api_error )

Removes any topic metric collector with the given name, if it exists.

Parameters
sessionThe current session. If NULL, this function returns immediately.
paramsParameter structure describing the topic metric collector name and the callbacks to be invoked.
api_errorPopulated on API error. Can be NULL.
Returns
true if the operation was successful. False, otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.

◆ diffusion_session_metric_collector_builder_export_to_prometheus()

DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T * diffusion_session_metric_collector_builder_export_to_prometheus ( DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T * builder,
bool export_to_prometheus )

Specifies whether the metric collector should export metrics to Prometheus or not.

Limit the number of groups maintained by this metric collector.

The default is that metrics are not exported to Prometheus.

Parameters
builderthe session metric collector builder
export_to_prometheustrue to export metrics to Prometheus
Returns
the session metric collector builder
Since
6.7

Session metric collectors can group metrics by properties. This property places an upper limit on the number of groups that will be maintained for the metric collector.

For example, if a session metric collector groups by $SessionId and maximum_groups is 10, then metrics will only be collected for the first 10 sessions.

Parameters
builderthe session metric collector builder
export_to_prometheustrue to export metrics to Prometheus
Returns
the session metric collector builder
Since
6.7

◆ diffusion_session_metric_collector_builder_free()

void diffusion_session_metric_collector_builder_free ( DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T * builder)

Free a session metric collector builder.

Parameters
builderthe session metric collector builder
Since
6.7

◆ diffusion_session_metric_collector_builder_group_by_properties()

DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T * diffusion_session_metric_collector_builder_group_by_properties ( DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T * builder,
LIST_T * property_names )

Specifies a list of session property names to group by, replacing any current list known to this builder.

Parameters
builderthe session metric collector builder
property_namesa list of session property names. See session.h for details of session properties
Returns
the session metric collector builder
Since
6.7

◆ diffusion_session_metric_collector_builder_group_by_property()

DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T * diffusion_session_metric_collector_builder_group_by_property ( DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T * builder,
char * property_name )

Adds the name of a session property to group by to the list known to this builder.

By default a builder will initially have no session properties to group by set.

Parameters
builderthe session metric collector builder
property_namethe name of the session property. See session.h for details of session properties
Returns
the session metric collector builder
Since
6.7

◆ diffusion_session_metric_collector_builder_init()

DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T * diffusion_session_metric_collector_builder_init ( )

Initialize a new session metric collector builder.

diffusion_session_metric_collector_builder_free should be called on this pointer when no longer needed.

Returns
the session metric collector builder
Since
6.7

◆ diffusion_session_metric_collector_builder_maximum_groups()

DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T * diffusion_session_metric_collector_builder_maximum_groups ( DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T * builder,
int limit )

Set the maximum number of groups maintained by the metric collector.

By default, the number of groups is not limited.

Parameters
builderthe session metric collector builder
limita positive integer
Returns
the session metric collector builder
Since
6.8

◆ diffusion_session_metric_collector_builder_remove_metrics_with_no_matches()

DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T * diffusion_session_metric_collector_builder_remove_metrics_with_no_matches ( DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T * builder,
bool remove )

Specifies whether the metric collector should remove any metrics that have no matches.

The default is that the metric collector will not remove metrics with no matches.

Parameters
builderthe session metric collector builder
removetrue to indicate that metrics with no matches should be removed
Returns
the session metric collector builder
Since
6.7

◆ diffusion_session_metric_collector_builder_reset()

DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T * diffusion_session_metric_collector_builder_reset ( DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T * builder)

Reset the session metric collector builder's internal values.

Parameters
builderthe session metric collector builder
Returns
the session metric collector builder
Since
6.7

◆ diffusion_session_metric_collector_compare()

bool diffusion_session_metric_collector_compare ( DIFFUSION_SESSION_METRIC_COLLECTOR_T * collector_1,
DIFFUSION_SESSION_METRIC_COLLECTOR_T * collector_2 )

Compares two session metric collectors.

Parameters
collector_1a session metric collector
collector_2another session metric collector
Returns
true if both session metric collectors are identical.
Since
6.7

◆ diffusion_session_metric_collector_exports_to_prometheus()

bool diffusion_session_metric_collector_exports_to_prometheus ( DIFFUSION_SESSION_METRIC_COLLECTOR_T * collector,
bool * exports_to_prometheus )

Indicates whether the metric collector exports to Prometheus.

Parameters
collectorthe session metric collector
exports_to_prometheusthe variable that will receive the bool value if present
Returns
true if the collector is valid and extracted the value
Since
6.7

◆ diffusion_session_metric_collector_free()

void diffusion_session_metric_collector_free ( DIFFUSION_SESSION_METRIC_COLLECTOR_T * collector)

Free a session metric collector.

Parameters
collectorthe session metric collector
Since
6.7

◆ diffusion_session_metric_collector_get_group_by_properties()

bool diffusion_session_metric_collector_get_group_by_properties ( DIFFUSION_SESSION_METRIC_COLLECTOR_T * collector,
LIST_T ** group_by )

Returns the list of properties to group by.

Parameters
collectorthe session metric collector
group_bythe variable that will receive the list value if present
Returns
true if the collector is valid and extracted the value
Since
6.7

◆ diffusion_session_metric_collector_get_name()

bool diffusion_session_metric_collector_get_name ( DIFFUSION_SESSION_METRIC_COLLECTOR_T * collector,
char ** name )

Returns the name of the session metric collector.

Parameters
collectorthe session metric collector
namethe variable that will receive the name if present
Returns
true if the collector is valid and extracted the value
Since
6.7

◆ diffusion_session_metric_collector_get_session_filter()

bool diffusion_session_metric_collector_get_session_filter ( DIFFUSION_SESSION_METRIC_COLLECTOR_T * collector,
char ** session_filter )

Returns the session filter of the session metric collector.

Parameters
collectorthe session metric collector
session_filterthe variable that will receive the session filter if present
Returns
true if the collector is valid and extracted the value
Since
6.7

◆ diffusion_session_metric_collector_maximum_groups()

bool diffusion_session_metric_collector_maximum_groups ( DIFFUSION_SESSION_METRIC_COLLECTOR_T * collector,
int * maximum_groups )

Limit the number of groups maintained by this metric collector.

Session metric collectors can group metrics by properties. This property places an upper limit on the number of groups that will be maintained for the metric collector.

For example, if a session metric collector groups by $SessionId and maximum_groups is 10, then metrics will only be collected for the first 10 sessions.

Parameters
collectorthe session metric collector
maximum_groupsthe variable that will receive the int value if present
Returns
true if the collector is valid and extracted the value
Since
6.8

◆ diffusion_session_metric_collector_removes_metrics_with_no_matches()

bool diffusion_session_metric_collector_removes_metrics_with_no_matches ( DIFFUSION_SESSION_METRIC_COLLECTOR_T * collector,
bool * removes )

Indicates whether metrics with no matches should be removed.

Parameters
collectorthe session metric collector
removesthe variable that will receive the bool value if present
Returns
true if the collector is valid and extracted the value
Since
6.7

◆ diffusion_topic_metric_collector_builder_create()

DIFFUSION_TOPIC_METRIC_COLLECTOR_T * diffusion_topic_metric_collector_builder_create ( DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T * builder,
char * name,
char * topic_selector,
DIFFUSION_API_ERROR * api_error )

Create a new topic metric collector using the values currently known by the builder.

Parameters
builderthe topic metric collector builder
namethe name of the topic metric collector
topic_selectorthe selector pattern that specifies the topics for which metrics are to be collected
api_errorpopulated on API error. Can be NULL.
Returns
a new topic metric collector if the operation was successful, NULL otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.
Since
6.7

◆ diffusion_topic_metric_collector_builder_export_to_prometheus()

DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T * diffusion_topic_metric_collector_builder_export_to_prometheus ( DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T * builder,
bool export_to_prometheus )

Specifies whether the metric collector should export metrics to Prometheus or not.

The default is that metrics are not exported to Prometheus.

Parameters
builderthe topic metric collector builder
export_to_prometheustrue to export metrics to Prometheus
Returns
the topic metric collector builder
Since
6.7

◆ diffusion_topic_metric_collector_builder_free()

void diffusion_topic_metric_collector_builder_free ( DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T * builder)

Free a topic metric collector builder.

Parameters
builderthe topic metric collector builder
Since
6.7

◆ diffusion_topic_metric_collector_builder_group_by_path_prefix_parts()

DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T * diffusion_topic_metric_collector_builder_group_by_path_prefix_parts ( DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T * builder,
int parts )

Specifies the number of leading parts of the topic path the metric collector should use to group results.

By default a topic metric collector does not group by the topic path prefix. If a positive number of parts is specified, it will enable grouping.

Parameters
builderthe topic metric collector builder
partsthe number of leading parts of the topic path to group by; set to 0 to disable grouping by path
Returns
the topic metric collector builder
Since
6.8

◆ diffusion_topic_metric_collector_builder_group_by_topic_type()

DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T * diffusion_topic_metric_collector_builder_group_by_topic_type ( DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T * builder,
bool group_by_topic_type )

Specifies whether the metric collector should group by topic type.

By default a topic metric collector does not group by topic type.

Parameters
builderthe topic metric collector builder
group_by_topic_typetrue to indicate that the collector should group by topic type
Returns
the topic metric collector builder
Since
6.7

◆ diffusion_topic_metric_collector_builder_group_by_topic_view()

DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T * diffusion_topic_metric_collector_builder_group_by_topic_view ( DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T * builder,
bool group_by_topic_view )

Specifies whether the metric collector should group by topic view.

By default a topic metric collector does not group by topic view.

Parameters
builderthe topic metric collector builder
group_by_topic_viewtrue to indicate that the collector should group by topic view
Returns
the topic metric collector builder
Since
6.9

◆ diffusion_topic_metric_collector_builder_init()

DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T * diffusion_topic_metric_collector_builder_init ( )

Initialize a new topic metric collector builder.

diffusion_session_topic_collector_builder_free should be called on this pointer when no longer needed.

Returns
the topic metric collector builder
Since
6.7

◆ diffusion_topic_metric_collector_builder_maximum_groups()

DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T * diffusion_topic_metric_collector_builder_maximum_groups ( DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T * builder,
int limit )

Set the maximum number of groups maintained by the metric collector.

By default, the number of groups is not limited.

Parameters
builderthe session metric collector builder
limita positive integer
Returns
the topic metric collector builder
Since
6.8

◆ diffusion_topic_metric_collector_builder_reset()

DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T * diffusion_topic_metric_collector_builder_reset ( DIFFUSION_TOPIC_METRIC_COLLECTOR_BUILDER_T * builder)

Reset the topic metric collector builder's internal values.

Parameters
builderthe topic metric collector builder
Returns
the topic metric collector builder
Since
6.7

◆ diffusion_topic_metric_collector_compare()

bool diffusion_topic_metric_collector_compare ( DIFFUSION_TOPIC_METRIC_COLLECTOR_T * collector_1,
DIFFUSION_TOPIC_METRIC_COLLECTOR_T * collector_2 )

Compares two topic metric collectors.

Parameters
collector_1a topic metric collector
collector_2another topic metric collector
Returns
true if both topic metric collectors are identical.
Since
6.7

◆ diffusion_topic_metric_collector_exports_to_prometheus()

bool diffusion_topic_metric_collector_exports_to_prometheus ( DIFFUSION_TOPIC_METRIC_COLLECTOR_T * collector,
bool * exports_to_prometheus )

Indicates whether the metric collector exports to Prometheus.

Parameters
collectorthe topic metric collector
exports_to_prometheusthe variable that will receive the bool value if present
Returns
true if the collector is valid and extracted the value
Since
6.7

◆ diffusion_topic_metric_collector_free()

void diffusion_topic_metric_collector_free ( DIFFUSION_TOPIC_METRIC_COLLECTOR_T * collector)

Free a topic metric collector.

Parameters
collectorthe topic metric collector
Since
6.7

◆ diffusion_topic_metric_collector_get_name()

bool diffusion_topic_metric_collector_get_name ( DIFFUSION_TOPIC_METRIC_COLLECTOR_T * collector,
char ** name )

Returns the name of the topic metric collector.

Parameters
collectorthe topic metric collector
namethe variable that will receive the name if present
Returns
true if the collector is valid and extracted the value
Since
6.7

◆ diffusion_topic_metric_collector_get_topic_selector()

bool diffusion_topic_metric_collector_get_topic_selector ( DIFFUSION_TOPIC_METRIC_COLLECTOR_T * collector,
char ** topic_selector )

Returns the topic selector of the topic metric collector.

Parameters
collectorthe topic metric collector
topic_selectorthe variable that will receive the topic selector if present
Returns
true if the collector is valid and extracted the value
Since
6.7

◆ diffusion_topic_metric_collector_group_by_path_prefix_parts()

bool diffusion_topic_metric_collector_group_by_path_prefix_parts ( DIFFUSION_TOPIC_METRIC_COLLECTOR_T * collector,
int * group_by_path_prefix_parts )

Specifies the number of leading parts of the topic path to group by, or 0, if the collector does not group by path prefix.

Parameters
collectorthe topic metric collector
group_by_path_prefix_partsthe variable that will receive the int value if present
Returns
true if the collector is valid and extracted the value
Since
6.8

◆ diffusion_topic_metric_collector_groups_by_topic_type()

bool diffusion_topic_metric_collector_groups_by_topic_type ( DIFFUSION_TOPIC_METRIC_COLLECTOR_T * collector,
bool * groups_by_topic_type )

Specifies whether the metric collector should group by topic type.

Parameters
collectorthe topic metric collector
groups_by_topic_typethe variable that will receive the bool value if present
Returns
true if the collector is valid and extracted the value
Since
6.7

◆ diffusion_topic_metric_collector_groups_by_topic_view()

bool diffusion_topic_metric_collector_groups_by_topic_view ( DIFFUSION_TOPIC_METRIC_COLLECTOR_T * collector,
bool * groups_by_topic_view )

Indicates whether the metric collector groups by topic view.

Parameters
collectorthe topic metric collector
groups_by_topic_viewthe variable that will receive the bool value if present
Returns
true if the collector is valid and extracted the value
Since
6.9

◆ diffusion_topic_metric_collector_maximum_groups()

bool diffusion_topic_metric_collector_maximum_groups ( DIFFUSION_TOPIC_METRIC_COLLECTOR_T * collector,
int * maximum_groups )

Limit the number of groups maintained by this metric collector.

Topic metric collectors can group metrics by properties. This property places an upper limit on the number of groups that will be maintained for the metric collector.

Parameters
collectorthe topic metric collector
maximum_groupsthe variable that will receive the int value if present
Returns
true if the collector is valid and extracted the value
Since
6.8