summaryrefslogtreecommitdiffstats
path: root/streaming
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2023-10-28 17:40:47 +0100
committerGitHub <noreply@github.com>2023-10-28 19:40:47 +0300
commit48af9dc2e00b4cfdd6964503fa9d6902678447d4 (patch)
tree19ce931c41f6d9de6a2a73c2e2e5827d01733c0d /streaming
parenta84213ca315ea3cedba7d6197bcb087a1515704c (diff)
do not propagate upstream internal label sources (#16295)
Diffstat (limited to 'streaming')
-rw-r--r--streaming/rrdpush.c2
-rw-r--r--streaming/sender.c16
2 files changed, 10 insertions, 8 deletions
diff --git a/streaming/rrdpush.c b/streaming/rrdpush.c
index 74af46fe03..0899ae3025 100644
--- a/streaming/rrdpush.c
+++ b/streaming/rrdpush.c
@@ -208,7 +208,7 @@ int configured_as_parent() {
// chart labels
static int send_clabels_callback(const char *name, const char *value, RRDLABEL_SRC ls, void *data) {
BUFFER *wb = (BUFFER *)data;
- buffer_sprintf(wb, "CLABEL \"%s\" \"%s\" %d\n", name, value, ls);
+ buffer_sprintf(wb, "CLABEL \"%s\" \"%s\" %d\n", name, value, ls & ~(RRDLABEL_FLAG_INTERNAL));
return 1;
}
diff --git a/streaming/sender.c b/streaming/sender.c
index d7fd03f135..1e89a57a73 100644
--- a/streaming/sender.c
+++ b/streaming/sender.c
@@ -90,13 +90,15 @@ void sender_commit(struct sender_state *s, BUFFER *wb, STREAM_TRAFFIC_TYPE type)
sender_lock(s);
-// FILE *fp = fopen("/tmp/stream.txt", "a");
-// fprintf(fp,
-// "\n--- SEND BEGIN: %s ----\n"
-// "%s"
-// "--- SEND END ----------------------------------------\n"
-// , rrdhost_hostname(s->host), src);
-// fclose(fp);
+// if(s->host == localhost && type == STREAM_TRAFFIC_TYPE_METADATA) {
+// FILE *fp = fopen("/tmp/stream.txt", "a");
+// fprintf(fp, "\n--- SEND MESSAGE START: %s ----\n"
+// "%s"
+// "--- SEND MESSAGE END ----------------------------------------\n"
+// , rrdhost_hostname(s->host), src
+// );
+// fclose(fp);
+// }
if(unlikely(s->buffer->max_size < (src_len + 1) * SENDER_BUFFER_ADAPT_TO_TIMES_MAX_SIZE)) {
netdata_log_info("STREAM %s [send to %s]: max buffer size of %zu is too small for a data message of size %zu. Increasing the max buffer size to %d times the max data message size.",