Skip to content

Conversation

@Baoyuantop
Copy link
Contributor

Description

We changed the attribute of the Opentelemetry plugin to metadata in PR #11940. After that, users can set the set_ngx_var property in metadata. However, the generated template file still relies on the set_ngx_var property from the plugin attribute to predefine variables https://github.com/apache/apisix/blob/master/apisix/cli/ops.lua#L553-L556, which will confuse users. This PR removes this judgment and allows this property to be controlled in metadata only.

Which issue(s) this PR fixes:

Fixes #12402

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)

@Baoyuantop Baoyuantop marked this pull request as ready for review July 11, 2025 09:32
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working plugin labels Jul 11, 2025
@Baoyuantop Baoyuantop merged commit 1ebc217 into apache:master Jul 15, 2025
34 of 42 checks passed
@Baoyuantop Baoyuantop deleted the fix-opentelemetry-vars branch July 15, 2025 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working plugin size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: openelemetry set_ngx_var option causes errors

4 participants