Diffusion C API 6.12.0
Loading...
Searching...
No Matches
Build a topic metric collector.

Functions

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.

Detailed Description

Function Documentation

◆ 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