Skip to content

Commit

Permalink
Warn against using allow_custom_values (#514)
Browse files Browse the repository at this point in the history
* warn against using allow_custom_values

* changelog

* remove prefix debug
  • Loading branch information
jerbly authored Dec 9, 2024
1 parent 9769b3a commit 0ecdee2
Show file tree
Hide file tree
Showing 47 changed files with 1,423 additions and 563 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ What's changed
* `experimental` is still accepted when parsing but aliased to `development`.
* The minijinja test, `experimental`, now returns true for any variant other than `stable`.
* EBNF and JSON schema updated to define the new enum without the `experimental` variant.
* Issue [#301](https://github.com/open-telemetry/weaver/issues/301) - Warn against usage of `allow_custom_values`. ([#514](https://github.com/open-telemetry/weaver/pull/514) by @jerbly).

## [0.11.0] - 2024-12-05

Expand Down
2 changes: 0 additions & 2 deletions crates/weaver_forge/data/jvm-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ groups:
- id: jvm.memory.type
stability: stable
type:
allow_custom_values: false
members:
- id: heap
value: 'heap'
Expand Down Expand Up @@ -106,7 +105,6 @@ groups:
stability: stable
requirement_level: recommended
type:
allow_custom_values: false
members:
- id: new
value: 'new'
Expand Down
3 changes: 0 additions & 3 deletions crates/weaver_forge/data/registry-db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ groups:
tag: tech-specific-cosmosdb
- id: db.cosmosdb.connection_mode
type:
allow_custom_values: false
members:
- id: gateway
value: 'gateway'
Expand All @@ -104,7 +103,6 @@ groups:
tag: tech-specific-cosmosdb
- id: db.cosmosdb.operation_type
type:
allow_custom_values: true
members:
- id: invalid
value: 'Invalid'
Expand Down Expand Up @@ -256,7 +254,6 @@ groups:
- id: db.system
brief: An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.
type:
allow_custom_values: true
members:
- id: other_sql
value: 'other_sql'
Expand Down
1 change: 0 additions & 1 deletion crates/weaver_forge/data/registry-http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ groups:
- id: http.request.method
stability: stable
type:
allow_custom_values: true
members:
- id: connect
value: "CONNECT"
Expand Down
5 changes: 0 additions & 5 deletions crates/weaver_forge/data/registry-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ groups:
examples: "sprint"
- id: network.connection.subtype
type:
allow_custom_values: true
members:
- id: gprs
brief: GPRS
Expand Down Expand Up @@ -91,7 +90,6 @@ groups:
examples: 'LTE'
- id: network.connection.type
type:
allow_custom_values: true
members:
- id: wifi
value: "wifi"
Expand Down Expand Up @@ -143,7 +141,6 @@ groups:
- id: network.transport
stability: stable
type:
allow_custom_values: true
members:
- id: tcp
value: 'tcp'
Expand All @@ -170,7 +167,6 @@ groups:
- id: network.type
stability: stable
type:
allow_custom_values: true
members:
- id: ipv4
value: 'ipv4'
Expand All @@ -183,7 +179,6 @@ groups:
examples: ['ipv4', 'ipv6']
- id: network.io.direction
type:
allow_custom_values: false
members:
- id: transmit
value: 'transmit'
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion crates/weaver_forge/src/extensions/otel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,7 @@ mod tests {
.collect();

AttributeType::Enum {
allow_custom_values: true,
allow_custom_values: Some(true),
members,
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ groups:
examples: 1439
- id: messaging.operation
type:
allow_custom_values: true
members:
- id: publish
value: "publish"
Expand Down Expand Up @@ -155,7 +154,6 @@ groups:
examples: "myConsumerGroup"
- id: messaging.rocketmq.consumption_model
type:
allow_custom_values: false
members:
- id: clustering
value: "clustering"
Expand Down Expand Up @@ -192,7 +190,6 @@ groups:
examples: tagA
- id: messaging.rocketmq.message.type
type:
allow_custom_values: false
members:
- id: normal
value: "normal"
Expand Down Expand Up @@ -222,7 +219,6 @@ groups:
brief: >
An identifier for the messaging system being used. See below for a list of well-known identifiers.
type:
allow_custom_values: true
members:
- id: activemq
value: "activemq"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ groups:
examples: 1439
- id: operation
type:
allow_custom_values: true
members:
- id: publish
value: "publish"
Expand Down Expand Up @@ -155,7 +154,6 @@ groups:
examples: "myConsumerGroup"
- id: rocketmq.consumption_model
type:
allow_custom_values: false
members:
- id: clustering
value: "clustering"
Expand Down Expand Up @@ -192,7 +190,6 @@ groups:
examples: tagA
- id: rocketmq.message.type
type:
allow_custom_values: false
members:
- id: normal
value: "normal"
Expand Down Expand Up @@ -222,7 +219,6 @@ groups:
brief: >
An identifier for the messaging system being used. See below for a list of well-known identifiers.
type:
allow_custom_values: true
members:
- id: activemq
value: "activemq"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ groups:
- id: faas.trigger
brief: 'Type of the trigger which caused this function invocation.'
type:
allow_custom_values: false
members:
- id: datasource
value: 'datasource'
Expand Down Expand Up @@ -34,7 +33,6 @@ groups:
examples: 'my-function'
- id: faas.invoked_provider
type:
allow_custom_values: true
members:
- id: 'alibaba_cloud'
value: 'alibaba_cloud'
Expand Down
Loading

0 comments on commit 0ecdee2

Please sign in to comment.