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

Move footnotes back together with the rendered table in Markdown #131

Merged
merged 3 commits into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions semantic-conventions/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Please update the changelog as part of any significant pull request.

## Unreleased

## v0.15.1

- Move footnotes back together with the rendered table in Markdown
arminru marked this conversation as resolved.
Show resolved Hide resolved
([#131](https://github.com/open-telemetry/build-tools/pull/131))

## v0.15.0

- Add a semantic convention type for Metrics ("metric" and "metric_group")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ def to_markdown_attribute_table(
attr_sampling_relevant = [
attr for attr in attr_to_print if attr.sampling_relevant
]
self.to_markdown_notes(output)
self.to_creation_time_attributes(attr_sampling_relevant, output)

@staticmethod
def to_markdown_metric_table(
semconv: MetricSemanticConvention, output: io.StringIO
self, semconv: MetricSemanticConvention, output: io.StringIO
):
"""
This method renders metrics as markdown table entry
Expand All @@ -227,6 +227,7 @@ def to_markdown_metric_table(
output.write(
f"| `{semconv.metric_name}` | {instrument} | `{semconv.unit}` | {semconv.brief} |\n"
)
self.to_markdown_notes(output)

def to_markdown_anyof(self, anyof: AnyOf, output: io.StringIO):
"""
Expand Down Expand Up @@ -473,7 +474,6 @@ def _render_group(self, semconv, parameters, output):
output.write(f"The event name MUST be `{semconv.name}`.\n\n")
self.to_markdown_attribute_table(semconv, output)

self.to_markdown_notes(output)
if not self.render_ctx.is_remove_constraint:
for cnst in semconv.constraints:
self.to_markdown_constraint(cnst, output)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `http.method` | string | . | `GET` | Required |
| `http.url` | string | . | `.` | Recommended |
| `http.url` | string | . [1] | `.` | Recommended |
| `http.target` | string | . | `.` | Recommended |
| `http.host` | string | . | `.` | Recommended |
| `http.scheme` | string | . | `http` | Recommended |
Expand All @@ -14,6 +14,8 @@
| [`net.peer.name`](span-general.md) | string | . | `.` | Recommended |
| [`net.peer.port`](span-general.md) | int | . | | Recommended |

**[1]:** `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`.

Following attributes MUST be provided **at span creation time** (when provided at all), so they can be considered for sampling decisions:

* `http.method`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ groups:
- id: url
type: string
brief: .
note: >
`http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`.
In such case the attribute's value should be `https://www.example.com/`.
sampling_relevant: true
examples: ['.']
- id: target
Expand Down