]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
write_open_telemetry plugin: Remove the unused "Path" config option.
authorFlorian Forster <octo@collectd.org>
Mon, 4 Dec 2023 16:14:18 +0000 (17:14 +0100)
committerFlorian Forster <octo@collectd.org>
Wed, 3 Jan 2024 16:16:28 +0000 (17:16 +0100)
src/write_open_telemetry.cc

index f1c99d085c142efb02bf58961be61a9233511b55..e10e57e4fb7f3dbc38a81757c8bb2d609ad90e68 100644 (file)
@@ -61,10 +61,6 @@ extern "C" {
 #define OT_DEFAULT_PORT "4317"
 #endif
 
-#ifndef OT_DEFAULT_PATH
-#define OT_DEFAULT_PATH "/v1/metrics"
-#endif
-
 using opentelemetry::proto::collector::metrics::v1::
     ExportMetricsServiceResponse;
 using opentelemetry::proto::collector::metrics::v1::MetricsService;
@@ -78,7 +74,6 @@ typedef struct {
 
   char *host;
   char *port;
-  char *path;
 
   cdtime_t staged_time;
   c_avl_tree_t *staged_metrics;         // char* metric_identity() -> NULL
@@ -207,7 +202,6 @@ static void ot_callback_decref(void *data) {
 
   sfree(cb->host);
   sfree(cb->port);
-  sfree(cb->path);
 
   pthread_mutex_unlock(&cb->mu);
   pthread_mutex_destroy(&cb->mu);
@@ -351,7 +345,6 @@ static int ot_config_node(oconfig_item_t *ci) {
   cf_util_get_string(ci, &cb->name);
   cb->host = strdup(OT_DEFAULT_HOST);
   cb->port = strdup(OT_DEFAULT_PORT);
-  cb->path = strdup(OT_DEFAULT_PATH);
 
   cb->staged_metrics =
       c_avl_create((int (*)(const void *, const void *))strcmp);
@@ -368,8 +361,6 @@ static int ot_config_node(oconfig_item_t *ci) {
       status = cf_util_get_string(child, &cb->host);
     else if (strcasecmp("Port", child->key) == 0)
       status = cf_util_get_service(child, &cb->port);
-    else if (strcasecmp("Protocol", child->key) == 0)
-      status = cf_util_get_string(child, &cb->path);
     else {
       ERROR("write_open_telemetry plugin: Invalid configuration "
             "option: %s.",