Skip to content

Commit

Permalink
Added test for omitting requirement level
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Wert <[email protected]>
  • Loading branch information
AlexanderWert committed Sep 12, 2023
1 parent 82ec0ff commit 004e711
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Common Attributes

<!-- semconv http(omit_requirement_level) -->
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `http.method` | string | HTTP request method. | `GET`; `POST`; `HEAD` |
| `http.url` | string | Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless. | `https://www.foo.bar/search?q=OpenTelemetry#SemConv` |
| `http.target` | string | The full request target as passed in a HTTP request line or equivalent. | `/path/12314/?q=ddds#123` |
<!-- endsemconv -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
groups:
- id: http
type: span
prefix: http
brief: 'This document defines semantic conventions for HTTP client and server Spans.'
note: >
These conventions can be used for http and https schemes
and various HTTP versions like 1.1, 2 and SPDY.
attributes:
- id: method
type: string
requirement_level: required
sampling_relevant: false
brief: 'HTTP request method.'
examples: ["GET", "POST", "HEAD"]
- id: url
type: string
brief: >
Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`.
Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless.
examples: ['https://www.foo.bar/search?q=OpenTelemetry#SemConv']
- id: target
type: string
brief: 'The full request target as passed in a HTTP request line or equivalent.'
examples: ['/path/12314/?q=ddds#123']
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Common Attributes

<!-- semconv http(omit_requirement_level) -->
<!-- endsemconv -->
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ def test_metric_tables(self):
],
)

def test_omit_requirement_level(self):
self.check("markdown/omit_requirement_level/")

def testSamplingRelevant(self):
self.check("markdown/sampling_relevant/")

Expand Down

0 comments on commit 004e711

Please sign in to comment.