Skip to content

Commit

Permalink
REmove more prefix from tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuereth committed Oct 10, 2024
1 parent 2f40d70 commit 79b036b
Show file tree
Hide file tree
Showing 18 changed files with 147 additions and 189 deletions.
11 changes: 5 additions & 6 deletions crates/weaver_semconv/data/event.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ groups:
- id: span.event.test.no_name
stability: experimental
type: event
prefix: span.event.test
name: span.event.test
brief: >
This event represents an occurrence of a span event.
attributes:
- id: attribute1
- id: span.event.test.attribute1
type: string
brief: 'The attribute1'
examples: ['value1', 'value2']
requirement_level:
conditionally_required: Required if `attribute2` is not set, recommended otherwise.
- id: attribute2
- id: span.event.test.attribute2
type: string
brief: 'The attribute2'
examples: ['value1', 'value2']
Expand All @@ -98,17 +98,16 @@ groups:
name: span.event.test.with_name
stability: experimental
type: event
prefix: span.event.test.with_name
brief: >
This event represents an occurrence of a span event.
attributes:
- id: attribute1
- id: span.event.test.with_name.attribute1
type: string
brief: 'The attribute1'
examples: ['value1', 'value2']
requirement_level:
conditionally_required: Required if `attribute2` is not set, recommended otherwise.
- id: attribute2
- id: span.event.test.with_name.attribute2
type: string
brief: 'The attribute2'
examples: ['value1', 'value2']
Expand Down
7 changes: 3 additions & 4 deletions crates/weaver_semconv/data/exception.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
groups:
- id: exception
type: span
prefix: exception
brief: >
This document defines the shared attributes used to
report a single exception associated with a span or log.
attributes:
- id: type
- id: exception.type
type: string
brief: >
The type of the exception (its fully-qualified class name, if applicable).
The dynamic type of the exception should be preferred over the static type
in languages that support it.
examples: ["java.net.ConnectException", "OSError"]
- id: message
- id: exception.message
type: string
brief: The exception message.
examples: ["Division by zero", "Can't convert 'int' object to str implicitly"]
- id: stacktrace
- id: exception.stacktrace
type: string
brief: >
A stacktrace as a string in the natural representation for the language runtime.
Expand Down
9 changes: 4 additions & 5 deletions crates/weaver_semconv/data/faas-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ groups:
type: attribute_group
brief: "Describes FaaS attributes."
display_name: "FaaS Attributes"
prefix: faas
attributes:
- id: trigger
- id: faas.trigger
brief: 'Type of the trigger which caused this function invocation.'
type:
allow_custom_values: false
Expand All @@ -25,7 +24,7 @@ groups:
- id: other
value: 'other'
brief: 'If none of the others apply'
- id: invoked_name
- id: faas.invoked_name
type: string
requirement_level: required
brief: >
Expand All @@ -34,7 +33,7 @@ groups:
SHOULD be equal to the `faas.name` resource attribute of the
invoked function.
examples: 'my-function'
- id: invoked_provider
- id: faas.invoked_provider
type:
allow_custom_values: true
members:
Expand All @@ -59,7 +58,7 @@ groups:
note: >
SHOULD be equal to the `cloud.provider` resource attribute of the
invoked function.
- id: invoked_region
- id: faas.invoked_region
type: string
requirement_level:
conditionally_required: >
Expand Down
21 changes: 8 additions & 13 deletions crates/weaver_semconv/data/faas.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
groups:
- id: faas_span
prefix: faas
type: span
brief: >
This semantic convention describes an instance of a function that
Expand All @@ -18,28 +17,27 @@ groups:
trigger that corresponding incoming would have (i.e., this has
nothing to do with the underlying transport used to make the API
call to invoke the lambda, which is often HTTP).
- id: invocation_id
- id: faas.invocation_id
type: string
brief: 'The invocation ID of the current function invocation.'
examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28'
- ref: cloud.resource_id

- id: faas_span.datasource
prefix: faas.document
type: span
brief: >
Semantic Convention for FaaS triggered as a response to some data
source operation such as a database or filesystem read/write.
attributes:
- id: collection
- id: faas.document.collection
type: string
requirement_level: required
brief: >
The name of the source on which the triggering operation was performed.
For example, in Cloud Storage or S3 corresponds to the bucket name,
and in Cosmos DB to the database name.
examples: ['myBucketName', 'myDbName']
- id: operation
- id: faas.document.operation
requirement_level: required
type:
allow_custom_values: true
Expand All @@ -54,14 +52,14 @@ groups:
value: 'delete'
brief: 'When an object is deleted.'
brief: 'Describes the type of the operation that was performed on the data.'
- id: time
- id: faas.document.time
type: string
brief: >
A string containing the time when the data was accessed in the
[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)
format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
examples: "2020-01-23T13:47:06Z"
- id: name
- id: faas.document.name
type: string
brief: >
The document name/table subjected to the operation.
Expand All @@ -88,19 +86,18 @@ groups:
attributes: []

- id: faas_span.timer
prefix: faas
type: span
brief: >
Semantic Convention for FaaS scheduled to be executed regularly.
attributes:
- id: time
- id: faas.time
type: string
brief: >
A string containing the function invocation time in the
[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)
format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
examples: "2020-01-23T13:47:06Z"
- id: cron
- id: faas.cron
type: string
brief: >
A string containing the schedule period as
Expand All @@ -109,12 +106,11 @@ groups:

- id: faas_span.in
span_kind: server
prefix: faas
type: span
brief: >
Contains additional attributes for incoming FaaS spans.
attributes:
- id: coldstart
- id: faas.coldstart
type: boolean
brief: >
A boolean that is true if the serverless function is executed for the
Expand All @@ -134,7 +130,6 @@ groups:
- id: faas_span.out
span_kind: client
prefix: faas
type: span
brief: >
Contains additional attributes for outgoing FaaS spans.
Expand Down
9 changes: 3 additions & 6 deletions crates/weaver_semconv/data/http-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ groups:
- id: attributes.http.common
type: attribute_group
brief: "Describes HTTP attributes."
prefix: http
attributes:
- id: request.method
- id: http.request.method
type:
allow_custom_values: true
members:
Expand Down Expand Up @@ -56,7 +55,7 @@ groups:
HTTP method names are case-sensitive and `http.request.method` attribute value MUST match a known HTTP method name exactly.
Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent.
Tracing instrumentations that do so, MUST also set `http.request.method_original` to the original value.
- id: response.status_code
- id: http.response.status_code
type: int
requirement_level:
conditionally_required: If and only if one was received/sent.
Expand All @@ -70,7 +69,6 @@ groups:
examples: ['1.0', '1.1', '2', '3']

- id: attributes.http.client
prefix: http
type: attribute_group
brief: 'HTTP Client attributes'
attributes:
Expand All @@ -96,11 +94,10 @@ groups:
URI port identifier, otherwise it MUST match `Host` header port identifier.
- id: attributes.http.server
prefix: http
type: attribute_group
brief: 'HTTP Server attributes'
attributes:
- id: route
- id: http.route
type: string
requirement_level:
conditionally_required: If and only if it's available
Expand Down
11 changes: 4 additions & 7 deletions crates/weaver_semconv/data/http.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
groups:
- id: trace.http.common
prefix: http
extends: attributes.http.common
type: attribute_group
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: request.method_original
- id: http.request.method_original
type: string
requirement_level:
conditionally_required: If and only if it's different than `http.request.method`.
brief: Original HTTP method sent by the client in the request line.
examples: ["GeT", "ACL", "foo"]
- id: request.body.size
- id: http.request.body.size
type: int
brief: >
The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and
is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
header. For requests using transport encoding, this should be the compressed size.
examples: 3495
- id: response.body.size
- id: http.response.body.size
type: int
brief: >
The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and
Expand All @@ -37,13 +36,12 @@ groups:
- ref: user_agent.original

- id: trace.http.client
prefix: http
type: span
extends: attributes.http.client
span_kind: client
brief: 'Semantic Convention for HTTP Client'
attributes:
- id: resend_count
- id: http.resend_count
type: int
brief: >
The ordinal number of request resending attempt (for any reason, including redirects).
Expand Down Expand Up @@ -86,7 +84,6 @@ groups:


- id: trace.http.server
prefix: http
type: span
extends: attributes.http.server
span_kind: server
Expand Down
10 changes: 4 additions & 6 deletions crates/weaver_semconv/data/jvm-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ groups:
- id: attributes.jvm.memory
type: attribute_group
brief: "Describes JVM memory metric attributes."
prefix: jvm.memory
attributes:
- id: type
- id: jvm.memory.type
type:
allow_custom_values: false
members:
Expand All @@ -17,7 +16,7 @@ groups:
requirement_level: recommended
brief: The type of memory.
examples: ["heap", "non_heap"]
- id: pool.name
- id: jvm.memory.pool.name
type: string
requirement_level: recommended
brief: Name of the memory pool.
Expand Down Expand Up @@ -64,17 +63,16 @@ groups:
brief: "Duration of JVM garbage collection actions."
instrument: histogram
unit: "s"
prefix: jvm.gc
attributes:
- id: name
- id: jvm.gc.name
type: string
requirement_level: recommended
brief: Name of the garbage collector.
examples: ["G1 Young Generation", "G1 Old Generation"]
note: >
Garbage collector name is generally obtained via
[GarbageCollectionNotificationInfo#getGcName()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcName()).
- id: action
- id: jvm.gc.action
type: string
requirement_level: recommended
brief: Name of the garbage collector action.
Expand Down
12 changes: 5 additions & 7 deletions crates/weaver_semconv/data/media.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
groups:
- id: attributes.log
prefix: log
type: attribute_group
brief: "Describes Log attributes"
attributes:
- id: iostream
- id: log.iostream
requirement_level: opt_in
brief: >
The stream associated with the log. See below for a list of well-known values.
Expand All @@ -18,30 +17,29 @@ groups:
value: 'stderr'
brief: 'Events from stderr stream'
- id: attributes.log.file
prefix: log.file
type: attribute_group
brief: >
A file to which log was emitted.
attributes:
- id: name
- id: log.file.name
type: string
requirement_level: recommended
brief: >
The basename of the file.
examples: ["audit.log"]
- id: path
- id: log.file.path
type: string
requirement_level: opt_in
brief: >
The full path to the file.
examples: [ "/var/log/mysql/audit.log" ]
- id: name_resolved
- id: log.file.name_resolved
type: string
requirement_level: opt_in
brief: >
The basename of the file, with symlinks resolved.
examples: [ "uuid.log" ]
- id: path_resolved
- id: log.file.path_resolved
type: string
requirement_level: opt_in
brief: >
Expand Down
Loading

0 comments on commit 79b036b

Please sign in to comment.