Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rendering] Enum values not sufficiently separate from attribute footnotes #1569

Open
dyladan opened this issue Nov 12, 2024 · 3 comments · May be fixed by #1570 or #1572
Open

[rendering] Enum values not sufficiently separate from attribute footnotes #1569

dyladan opened this issue Nov 12, 2024 · 3 comments · May be fixed by #1570 or #1572
Labels

Comments

@dyladan
Copy link
Member

dyladan commented Nov 12, 2024

Area(s)

area:other

What happened?

Description

When markdown is rendered, the attributes table is followed by footnotes, then by tables which list values for enums. Those enum tables are not sufficiently separated from the footnotes, and they appear to be a part of the footnotes when reading. For example in HTTP client semconv the error.type table of possible values appears to be part of footnote [14] even though it is not.

Example

Below is an example taken from HTTP client semconv that shows what I'm talking about

View example markdown
**[14]:** The `url.template` MUST have low cardinality. It is not usually available on HTTP clients, but may be known by the application or specialized HTTP instrumentation.

The following attributes can be important for making sampling decisions
and SHOULD be provided **at span creation time** (if provided at all):

* [`http.request.method`](/docs/attributes-registry/http.md)
* [`server.address`](/docs/attributes-registry/server.md)
* [`server.port`](/docs/attributes-registry/server.md)
* [`url.full`](/docs/attributes-registry/url.md)

`error.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

| Value  | Description | Stability |
|---|---|---|
| `_OTHER` | A fallback error value to be used when the instrumentation doesn't define a custom value. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
Above example rendered

[14]: The url.template MUST have low cardinality. It is not usually available on HTTP clients, but may be known by the application or specialized HTTP instrumentation.
The following attributes can be important for making sampling decisions
and SHOULD be provided at span creation time (if provided at all):

error.type has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

Value Description Stability
_OTHER A fallback error value to be used when the instrumentation doesn't define a custom value. Stable

What I'm asking for is some visual separation between these elements to make it more obvious that you have moved onto a separate section like this:

View example of suggested improved rendering (heading)

[14]: The url.template MUST have low cardinality. It is not usually available on HTTP clients, but may be known by the application or specialized HTTP instrumentation.
The following attributes can be important for making sampling decisions
and SHOULD be provided at span creation time (if provided at all):

Enum Values

error.type has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

Value Description Stability
_OTHER A fallback error value to be used when the instrumentation doesn't define a custom value. Stable
View example of suggested improved rendering (horizontal line separator)

[14]: The url.template MUST have low cardinality. It is not usually available on HTTP clients, but may be known by the application or specialized HTTP instrumentation.

The following attributes can be important for making sampling decisions
and SHOULD be provided at span creation time (if provided at all):


error.type has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

| Value | Description | Stability |
< |---|---|---|
| _OTHER | A fallback error value to be used when the instrumentation doesn't define a custom value. | Stable |

Semantic convention version

v1.28.0

Additional context

No response

@dyladan dyladan added bug Something isn't working triage:needs-triage labels Nov 12, 2024
dyladan added a commit to dyladan/semantic-conventions that referenced this issue Nov 12, 2024
Add headers in order to separate enum value tables from the footnotes
above.

Fixes open-telemetry#1569
@dyladan dyladan linked a pull request Nov 12, 2024 that will close this issue
dyladan added a commit to dyladan/semantic-conventions that referenced this issue Nov 12, 2024
Add separators in order to separate enum value tables from the footnotes above.

Fixes open-telemetry#1569
dyladan added a commit to dyladan/semantic-conventions that referenced this issue Nov 12, 2024
Add separators in order to separate enum value tables from the footnotes above.

Fixes open-telemetry#1569
@dyladan dyladan linked a pull request Nov 12, 2024 that will close this issue
@dyladan
Copy link
Member Author

dyladan commented Nov 12, 2024

I created two draft PRs to better show what I'm asking for. If there in consensus on one of them i'll make it a real PR

@trask
Copy link
Member

trask commented Nov 12, 2024

Another option could be to add make the enum values into a footnote on the attribute type, e.g.

Attribute Type Description Examples Stability
http.connection.state string [1] State of the HTTP connection in the HTTP connection pool. active; idle Experimental

[1]: http.connection.state has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

Value Description Stability
active active state. Experimental
idle idle state. Experimental

@dyladan
Copy link
Member Author

dyladan commented Nov 12, 2024

Another option could be to add make the enum values into a footnote on the attribute type, e.g.

Attribute Type Description Examples Stability
http.connection.state string [1] State of the HTTP connection in the HTTP connection pool. active; idle Experimental
[1]: http.connection.state has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

Value Description Stability
active active state. Experimental
idle idle state. Experimental

This solves another issue which is that the attribute table doesn't say anything about a list of acceptable values. If you look at the semconv I linked originally, nowhere does it say in the attribute table that error.type, http.request.method, or any other enum, is an enum that has specific allowable values. If you don't happen to scroll down you might miss that entirely.

edit: as long as we're considering larger changes, i'd also suggest to call it "extensible enum" instead of "string" for type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants