build-tools icon indicating copy to clipboard operation
build-tools copied to clipboard

Remove `allow_custom_values` flag on enums or change the default value to true

Open lmolkova opened this issue 11 months ago • 3 comments

We're reserving the right to add values to enums in the future in the spec

Things not listed in the above are not expected to remain stable via semantic convention and are allowed (or expected) to change. A few examples:

  • The values of attributes
    • An exception are existing values in lists of well-known values. However, new values can be added to such lists. Consumers should expect unknown values.

https://github.com/open-telemetry/opentelemetry-specification/blob/4f71c1642e541220e293bacf8c0d58f1fbcd3111/specification/versioning-and-stability.md?plain=1#L228-L231

But by default allow_custom_values is set to false resulting in "MUST be one of the following:" in the markdown and some confusion.

I suggest removing the flag completely, but given it's a breaking change, we can also consider changing it to true by default.

lmolkova avatar Mar 07 '24 19:03 lmolkova

Hello @lmolkova , can i work on this issue?

AkhigbeEromo avatar Apr 08 '24 22:04 AkhigbeEromo

Hi @AkhigbeEromo , thanks for the interest in build-tools! We're considering moving the functionality over to https://github.com/open-telemetry/weaver. You're very welcome to contribute there. We'll be finalizing the plan and will have a better idea of specific tasks it involves soon.

lmolkova avatar Apr 09 '24 16:04 lmolkova

An update on this issue:

  1. We now use weaver templates to generate snippets. In this world, we ignore the allow_custom_values flag and always output format as if it were true.
  2. We still need to make progress on deprecated/removing the flag from the YAML model.

jsuereth avatar May 15 '24 12:05 jsuereth