Skip to content

Commit

Permalink
Move footnotes back together with the rendered table in Markdown (ope…
Browse files Browse the repository at this point in the history
  • Loading branch information
arminru authored Jan 20, 2023
1 parent b560b37 commit 6baebe9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
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
([#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:[email protected]/`. 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:[email protected]/`.
In such case the attribute's value should be `https://www.example.com/`.
sampling_relevant: true
examples: ['.']
- id: target
Expand Down

0 comments on commit 6baebe9

Please sign in to comment.