out_opentelemetry: add header_tag / headers_key dynamic header support (like out_http)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with the out_opentelemetry output implementation and its configuration definitions, then read plugins/out_http/http.c for the existing header_tag and headers_key behavior. Check how OTLP requests are batched, especially the batching discussion in issue #7206, before deciding how record derived headers apply per chunk. Done means both options work with the documented semantics and tests cover them, including the chosen batching behavior.
索引モデルが issue の本文から書いたものです。
説明
Problem
out_opentelemetry only supports a static header option
(FLB_CONFIG_MAP_SLIST_1). There is no way to set a per-request or tag-derived
HTTP header.
Users who need to route OTLP data by tag are forced to write one complete
[OUTPUT] block per tag, where the outputs differ only in a single header
value. This does not scale when there are many services/tags.
Use case
OpenObserve selects the destination stream for OTLP logs using the
stream-name HTTP header (defaults to default). To send each Fluent Bit tag
to its own OpenObserve stream today you must duplicate the output once per tag:
[OUTPUT] name opentelemetry match app_a header stream-name app_a ...
[OUTPUT] name opentelemetry match app_b header stream-name app_b ...
This is the same problem out_http already solves with header_tag (a header
whose value is the tag) and headers_key (a header map read from a record
field).
Proposal
Add the same two options to out_opentelemetry:
header_tag <NAME>— add an HTTP header named<NAME>whose value is the
current tag. Example:header_tag stream-name.headers_key <KEY>— read a map of headers from record field<KEY>and
apply them per request (same semantics asout_http).
With header_tag, the OpenObserve case above becomes a single output:
[OUTPUT]
name opentelemetry
match *
header_tag stream-name
Reference
out_http already implements both:
header_tag—plugins/out_http/http.cheaders_key—plugins/out_http/http.c(extract_headersreads
record[<key>])
Notes
header_tagmaps naturally to OTLP batching (the tag is constant per chunk).headers_keymay require batching/grouping records by header value (see
https://github.com/fluent/fluent-bit/issues/7206 for howout_httphandled
batching), or limiting it to per-chunk semantics.
Current workaround
- One
[OUTPUT]per tag (N duplicated outputs), or - Carry the identity in OTLP resource attributes (e.g.
service.name) and
split on the backend side (e.g. OpenObserve pipeline with a{service.name}
dynamic stream).
- 主要言語
- C
- スター
- 8.2k
- フォーク
- 2k
- 平均マージ
- 3日 20時間
- マージ済み PR(30日)
- 99
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fluent/fluent-bit のほかの issue
-
in_tail: files falsely detected as rotated on macOS with threaded inputs, causing duplicate records対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
fluent/fluent-bit#12780 ·
メンテナーはふだん 1 日以内に返信
-
status: waiting-for-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fluent/fluent-bit#12683 · コメント 2 件 · リアクション 6 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
fluent/fluent-bit#12657 ·
メンテナーはふだん 1 日以内に返信
-
http: Transfer-Encoding chunked plus Content-Length hangs forever (CL branch shadows the chunked path)対応中かも @sarankumar1325 が 14 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
fluent/fluent-bit#12656 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
fluent/fluent-bit#12649 ·
メンテナーはふだん 1 日以内に返信
fluent/fluent-bit の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
micropython/micropython#19942 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
-
-disable-symbolserver is ignored on macOS/Linux: PDBs are still downloaded from msdl.microsoft.comオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100