feat: As a user, I want to be able to choose "root span name", so that I can better distringuish traces
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
- #13749 @UnoYakshi による — マージされずにクローズ
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- lua
調査の方向性
まず、apisix/plugins/opentelemetry.lua の417行目付近にある root span の命名ロジックを読み、リンクされている WIP PR #13749 を確認します。opentelemetry プラグインが root span と child span をどのように区別しているかを追跡し、要求された strategy configuration、そのデフォルト動作、および結果として生じる名前の変更が root span のみに影響することを検証します。
索引モデルが issue の本文から書いたものです。
説明
Clarification/Context
I have Tempo+Grafana setup, traces are correctly sent to the OTLP endpoint. However, I'd like the "Name" column (in Grafana) to show "http.target" / "url.uri" (of span attributes) and not "http.route". Because, for multiple endpoints, I'd get the same "Name", e.g., /api/admin/*. But it's currently hardcoded in opentelemetry.lua#L417.
As mentioned here, frontend application should own/be the parent span. However, when no there is no frontend application, it's not the case. And I'd like to be able to better distinguish one request from another.
Suggestion
What if we add another parameter to opentelemetry plug-in, span_name_strategy?
{
"span_name_strategy": "path|target"
}
(pseudocode)
-- Either `metadata_schema` or `schema`...
local schema = {
type = "object",
properties = {
-- ...
span_name_strategy = {
type = "string",
enum = {"path", "target"},
default = "path",
},
-- ...
}
-- ...
local function resolve_span_name(conf, api_ctx)
local span_name_strategy = conf.span_name_strategy or "route"
if strategy == "target" then
return api_ctx.var.uri
end
return api_ctx.curr_req_matched._path
end
-- ...
-- Closer to line 417...
local span_name_suffix = resolve_span_name_suffix(plugin_info, api_ctx)
span_name = span_name .. " " .. span_name_suffix
WIP PR
https://github.com/apache/apisix/pull/13749
I'm not really sure how to affect only root span, and not children.
- 主要言語
- Lua
- スター
- 17.3k
- フォーク
- 3k
- 平均マージ
- 4日 16時間
- マージ済み PR(30日)
- 69
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/apisix のほかの issue
-
bug: an admin key injected with ${{VAR}} that contains only digits becomes a number, so the correct key gets 401対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
bug(body-transformer): runtime crash when request or response body is a JSON primitive対応中かも @bhuvan-somisetty が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
bug: openapi-to-mcp appends a second ? to a query-suffixed path template対応中かも @lordcheng10 が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 2 日以内に返信
-
ai-proxy forwards client `Transfer-Encoding: chunked` but sends an unchunked body (upstream 400)対応中かも @locker95 が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
As a user, I want the opa plugin to propagate trace context (traceparent) to OPA, so that OPA spans are linked to the APISIX request trace対応中かも @GitNimay が 21 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/apisix#14051 · コメント 3 件 ·
メンテナーはふだん 2 日以内に返信
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
bug discord guide:04-dustwallow-marsh locale:enUS lua-error triage v0.3.6
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
NaixGames/Polycosmos#79 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
loctvl842/monokai-pro.nvim#178 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100