![]() |
Diffusion C API 6.12.0
|
Files | |
file | session.h |
Functions relating to a session and session management. |
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.
builder | the session metric collector builder |
export_to_prometheus | true to export metrics to Prometheus |
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.
builder | the session metric collector builder |
export_to_prometheus | true to export metrics to Prometheus |
void diffusion_session_metric_collector_builder_free | ( | DIFFUSION_SESSION_METRIC_COLLECTOR_BUILDER_T * | builder | ) |
Free a session metric collector builder.
builder | the session metric collector builder |
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.
builder | the session metric collector builder |
property_names | a list of session property names. See session.h for details of session properties |
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.
builder | the session metric collector builder |
property_name | the name of the session property. See session.h for details of session properties |
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.
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.
builder | the session metric collector builder |
limit | a positive integer |
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.
builder | the session metric collector builder |
remove | true to indicate that metrics with no matches should be removed |
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.
builder | the session metric collector builder |