Commit 79248c1
committed
proxy: input plugins can now emit metrics and traces event types
Read event_type from the proxy definition and dispatch to the
appropriate append function (flb_input_metrics_append or
flb_input_trace_append) in the collect callback, mirroring how
the output proxy side already handles event_type.
Metrics and traces are decoded from msgpack using cmt_decode_msgpack
and ctr_decode_msgpack respectively before being appended. Logs remain
the default (event_type == 0) to preserve backwards compatibility.
Error handling mirrors the pattern in fw_prot.c:append_log: return
values are checked, resources are freed on failure, and ctr ownership
is not assumed on the traces success path since flb_input_trace_append
takes ownership of the context.
Fixes: #119141 parent f617ed1 commit 79248c1
1 file changed
Lines changed: 50 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
| 40 | + | |
| 41 | + | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
| |||
75 | 80 | | |
76 | 81 | | |
77 | 82 | | |
| 83 | + | |
78 | 84 | | |
| 85 | + | |
79 | 86 | | |
| 87 | + | |
| 88 | + | |
80 | 89 | | |
81 | 90 | | |
82 | 91 | | |
| |||
85 | 94 | | |
86 | 95 | | |
87 | 96 | | |
88 | | - | |
| 97 | + | |
89 | 98 | | |
90 | 99 | | |
91 | 100 | | |
| |||
94 | 103 | | |
95 | 104 | | |
96 | 105 | | |
97 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
98 | 144 | | |
99 | | - | |
100 | | - | |
| 145 | + | |
101 | 146 | | |
102 | 147 | | |
103 | 148 | | |
104 | 149 | | |
105 | 150 | | |
106 | 151 | | |
107 | | - | |
| 152 | + | |
108 | 153 | | |
109 | 154 | | |
110 | 155 | | |
| |||
0 commit comments