Skip to content

feat(plugin): Add span_name_strategy to OpenTelemetry plug-in config#13749

Draft
UnoYakshi wants to merge 1 commit into
apache:masterfrom
UnoYakshi:patch-1
Draft

feat(plugin): Add span_name_strategy to OpenTelemetry plug-in config#13749
UnoYakshi wants to merge 1 commit into
apache:masterfrom
UnoYakshi:patch-1

Conversation

@UnoYakshi

@UnoYakshi UnoYakshi commented Jul 24, 2026

Copy link
Copy Markdown

Description

For OpenTelemetry plug-in, add span_name_strategy (either "path" (default) or "target") to schema.
Resolver will now use suffix for span_name, depending on the strategy provided (or default). It will either utilize api_ctx.var.uri ("target") or api_ctx.curr_req_matched._path ("path"). It should only reflect the root span (Trace's Name).

Which issue(s) this PR fixes:

Fixes #13748

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

Add `span_name_strategy` (either "path" (default) or "target") to change `span_name` in the root span (Trace's Name).
@UnoYakshi
UnoYakshi marked this pull request as draft July 24, 2026 16:08
@UnoYakshi UnoYakshi changed the title [DRAFT] feat(opentelemetry): Add span_name_strategy to plug-in config... feat(opentelemetry): Add span_name_strategy to plug-in config Jul 24, 2026
@UnoYakshi UnoYakshi changed the title feat(opentelemetry): Add span_name_strategy to plug-in config feat(plugin): Add span_name_strategy to plug-in config Jul 24, 2026
@UnoYakshi UnoYakshi changed the title feat(plugin): Add span_name_strategy to plug-in config feat(plugin): Add span_name_strategy to OpenTelemetry plug-in config Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: As a user, I want to be able to choose "root span name", so that I can better distringuish traces

1 participant