diff --git a/crates/weaver_forge/data/registry-db.yaml b/crates/weaver_forge/data/registry-db.yaml index 00ffa426f..8d411ca3d 100644 --- a/crates/weaver_forge/data/registry-db.yaml +++ b/crates/weaver_forge/data/registry-db.yaml @@ -312,7 +312,7 @@ groups: type: members: - id: other_sql - stability: stable + stability: development value: 'other_sql' brief: 'Some other SQL database. Fallback only. See notes.' - id: mssql @@ -320,7 +320,7 @@ groups: value: 'mssql' brief: 'Microsoft SQL Server' - id: mssqlcompact - stability: stable + stability: development value: 'mssqlcompact' brief: 'Microsoft SQL Server Compact' - id: mysql diff --git a/crates/weaver_forge/data/registry-http.yaml b/crates/weaver_forge/data/registry-http.yaml index af9e57cd0..fcbe92dcd 100644 --- a/crates/weaver_forge/data/registry-http.yaml +++ b/crates/weaver_forge/data/registry-http.yaml @@ -32,43 +32,43 @@ groups: type: members: - id: connect - stability: experimental + stability: stable value: "CONNECT" brief: "CONNECT method." - id: delete - stability: experimental + stability: stable value: "DELETE" brief: "DELETE method." - id: get - stability: experimental + stability: stable value: "GET" brief: "GET method." - id: head - stability: experimental + stability: stable value: "HEAD" brief: "HEAD method." - id: options - stability: experimental + stability: stable value: "OPTIONS" brief: "OPTIONS method." - id: patch - stability: experimental + stability: stable value: "PATCH" brief: "PATCH method." - id: post - stability: experimental + stability: stable value: "POST" brief: "POST method." - id: put - stability: experimental + stability: stable value: "PUT" brief: "PUT method." - id: trace - stability: experimental + stability: stable value: "TRACE" brief: "TRACE method." - id: other - stability: experimental + stability: stable value: "_OTHER" brief: "Any HTTP method that the instrumentation has no prior knowledge of." brief: "HTTP request method." diff --git a/crates/weaver_forge/expected_output/semconv_jq_fn/semconv_attributes.json b/crates/weaver_forge/expected_output/semconv_jq_fn/semconv_attributes.json index c6f632b7c..e3c636cfb 100644 --- a/crates/weaver_forge/expected_output/semconv_jq_fn/semconv_attributes.json +++ b/crates/weaver_forge/expected_output/semconv_jq_fn/semconv_attributes.json @@ -592,7 +592,7 @@ "deprecated": null, "id": "other_sql", "note": null, - "stability": "stable", + "stability": "development", "value": "other_sql" }, { @@ -608,7 +608,7 @@ "deprecated": null, "id": "mssqlcompact", "note": null, - "stability": "stable", + "stability": "development", "value": "mssqlcompact" }, { @@ -1108,7 +1108,7 @@ "deprecated": null, "id": "connect", "note": null, - "stability": "development", + "stability": "stable", "value": "CONNECT" }, { @@ -1116,7 +1116,7 @@ "deprecated": null, "id": "delete", "note": null, - "stability": "development", + "stability": "stable", "value": "DELETE" }, { @@ -1124,7 +1124,7 @@ "deprecated": null, "id": "get", "note": null, - "stability": "development", + "stability": "stable", "value": "GET" }, { @@ -1132,7 +1132,7 @@ "deprecated": null, "id": "head", "note": null, - "stability": "development", + "stability": "stable", "value": "HEAD" }, { @@ -1140,7 +1140,7 @@ "deprecated": null, "id": "options", "note": null, - "stability": "development", + "stability": "stable", "value": "OPTIONS" }, { @@ -1148,7 +1148,7 @@ "deprecated": null, "id": "patch", "note": null, - "stability": "development", + "stability": "stable", "value": "PATCH" }, { @@ -1156,7 +1156,7 @@ "deprecated": null, "id": "post", "note": null, - "stability": "development", + "stability": "stable", "value": "POST" }, { @@ -1164,7 +1164,7 @@ "deprecated": null, "id": "put", "note": null, - "stability": "development", + "stability": "stable", "value": "PUT" }, { @@ -1172,7 +1172,7 @@ "deprecated": null, "id": "trace", "note": null, - "stability": "development", + "stability": "stable", "value": "TRACE" }, { @@ -1180,7 +1180,7 @@ "deprecated": null, "id": "other", "note": null, - "stability": "development", + "stability": "stable", "value": "_OTHER" } ] diff --git a/crates/weaver_forge/expected_output/semconv_jq_fn/semconv_grouped_attributes.json b/crates/weaver_forge/expected_output/semconv_jq_fn/semconv_grouped_attributes.json index 0240c614b..aa6a065fb 100644 --- a/crates/weaver_forge/expected_output/semconv_jq_fn/semconv_grouped_attributes.json +++ b/crates/weaver_forge/expected_output/semconv_jq_fn/semconv_grouped_attributes.json @@ -610,7 +610,7 @@ "deprecated": null, "id": "other_sql", "note": null, - "stability": "stable", + "stability": "development", "value": "other_sql" }, { @@ -626,7 +626,7 @@ "deprecated": null, "id": "mssqlcompact", "note": null, - "stability": "stable", + "stability": "development", "value": "mssqlcompact" }, { @@ -1136,7 +1136,7 @@ "deprecated": null, "id": "connect", "note": null, - "stability": "development", + "stability": "stable", "value": "CONNECT" }, { @@ -1144,7 +1144,7 @@ "deprecated": null, "id": "delete", "note": null, - "stability": "development", + "stability": "stable", "value": "DELETE" }, { @@ -1152,7 +1152,7 @@ "deprecated": null, "id": "get", "note": null, - "stability": "development", + "stability": "stable", "value": "GET" }, { @@ -1160,7 +1160,7 @@ "deprecated": null, "id": "head", "note": null, - "stability": "development", + "stability": "stable", "value": "HEAD" }, { @@ -1168,7 +1168,7 @@ "deprecated": null, "id": "options", "note": null, - "stability": "development", + "stability": "stable", "value": "OPTIONS" }, { @@ -1176,7 +1176,7 @@ "deprecated": null, "id": "patch", "note": null, - "stability": "development", + "stability": "stable", "value": "PATCH" }, { @@ -1184,7 +1184,7 @@ "deprecated": null, "id": "post", "note": null, - "stability": "development", + "stability": "stable", "value": "POST" }, { @@ -1192,7 +1192,7 @@ "deprecated": null, "id": "put", "note": null, - "stability": "development", + "stability": "stable", "value": "PUT" }, { @@ -1200,7 +1200,7 @@ "deprecated": null, "id": "trace", "note": null, - "stability": "development", + "stability": "stable", "value": "TRACE" }, { @@ -1208,7 +1208,7 @@ "deprecated": null, "id": "other", "note": null, - "stability": "development", + "stability": "stable", "value": "_OTHER" } ] diff --git a/crates/weaver_forge/expected_output/semconv_jq_fn/semconv_grouped_attributes_not_experimental.json b/crates/weaver_forge/expected_output/semconv_jq_fn/semconv_grouped_attributes_not_experimental.json new file mode 100644 index 000000000..903fed518 --- /dev/null +++ b/crates/weaver_forge/expected_output/semconv_jq_fn/semconv_grouped_attributes_not_experimental.json @@ -0,0 +1,1101 @@ +[ + { + "attributes": [ + { + "brief": "The fetch size used for paging, i.e. how many rows will be returned at once.\n", + "examples": [ + 5000 + ], + "name": "db.cassandra.page_size", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "tech-specific-cassandra", + "type": "int" + }, + { + "brief": "The name of the primary Cassandra table that the operation is acting upon, including the keyspace name (if applicable).", + "examples": "mytable", + "name": "db.cassandra.table", + "note": "This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "tech-specific-cassandra", + "type": "string" + }, + { + "brief": "The connection string used to connect to the database. It is recommended to remove embedded credentials.\n", + "examples": "Server=(localdb)\\v11.0;Integrated Security=true;", + "name": "db.connection_string", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "db-generic", + "type": "string" + }, + { + "brief": "Unique Cosmos client instance id.", + "examples": "3ba4827d-4422-483f-b59f-85b74211c11d", + "name": "db.cosmosdb.client_id", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "tech-specific-cosmosdb", + "type": "string" + }, + { + "brief": "Cosmos client connection mode.", + "name": "db.cosmosdb.connection_mode", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "tech-specific-cosmosdb", + "type": { + "allow_custom_values": null, + "members": [ + { + "brief": "Gateway (HTTP) connections mode", + "deprecated": null, + "id": "gateway", + "note": null, + "stability": "stable", + "value": "gateway" + }, + { + "brief": "Direct connection.", + "deprecated": null, + "id": "direct", + "note": null, + "stability": "stable", + "value": "direct" + } + ] + } + }, + { + "brief": "Cosmos DB container name.", + "examples": "anystring", + "name": "db.cosmosdb.container", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "tech-specific-cosmosdb", + "type": "string" + }, + { + "brief": "CosmosDB Operation Type.", + "name": "db.cosmosdb.operation_type", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "tech-specific-cosmosdb", + "type": { + "allow_custom_values": null, + "members": [ + { + "brief": null, + "deprecated": null, + "id": "invalid", + "note": null, + "stability": "stable", + "value": "Invalid" + }, + { + "brief": null, + "deprecated": null, + "id": "create", + "note": null, + "stability": "stable", + "value": "Create" + }, + { + "brief": null, + "deprecated": null, + "id": "patch", + "note": null, + "stability": "stable", + "value": "Patch" + }, + { + "brief": null, + "deprecated": null, + "id": "read", + "note": null, + "stability": "stable", + "value": "Read" + }, + { + "brief": null, + "deprecated": null, + "id": "read_feed", + "note": null, + "stability": "stable", + "value": "ReadFeed" + }, + { + "brief": null, + "deprecated": null, + "id": "delete", + "note": null, + "stability": "stable", + "value": "Delete" + }, + { + "brief": null, + "deprecated": null, + "id": "replace", + "note": null, + "stability": "stable", + "value": "Replace" + }, + { + "brief": null, + "deprecated": null, + "id": "execute", + "note": null, + "stability": "stable", + "value": "Execute" + }, + { + "brief": null, + "deprecated": null, + "id": "query", + "note": null, + "stability": "stable", + "value": "Query" + }, + { + "brief": null, + "deprecated": null, + "id": "head", + "note": null, + "stability": "stable", + "value": "Head" + }, + { + "brief": null, + "deprecated": null, + "id": "head_feed", + "note": null, + "stability": "stable", + "value": "HeadFeed" + }, + { + "brief": null, + "deprecated": null, + "id": "upsert", + "note": null, + "stability": "stable", + "value": "Upsert" + }, + { + "brief": null, + "deprecated": null, + "id": "batch", + "note": null, + "stability": "stable", + "value": "Batch" + }, + { + "brief": null, + "deprecated": null, + "id": "query_plan", + "note": null, + "stability": "stable", + "value": "QueryPlan" + }, + { + "brief": null, + "deprecated": null, + "id": "execute_javascript", + "note": null, + "stability": "stable", + "value": "ExecuteJavaScript" + } + ] + } + }, + { + "brief": "RU consumed for that operation", + "examples": [ + 46.18, + 1.0 + ], + "name": "db.cosmosdb.request_charge", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "tech-specific-cosmosdb", + "type": "double" + }, + { + "brief": "Request payload size in bytes", + "name": "db.cosmosdb.request_content_length", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "tech-specific-cosmosdb", + "type": "int" + }, + { + "brief": "Cosmos DB status code.", + "examples": [ + 200, + 201 + ], + "name": "db.cosmosdb.status_code", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "tech-specific-cosmosdb", + "type": "int" + }, + { + "brief": "Cosmos DB sub status code.", + "examples": [ + 1000, + 1002 + ], + "name": "db.cosmosdb.sub_status_code", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "tech-specific-cosmosdb", + "type": "int" + }, + { + "brief": "Represents the identifier of an Elasticsearch cluster.\n", + "examples": [ + "e9106fc68e3044f0b1475b04bf4ffd5f" + ], + "name": "db.elasticsearch.cluster.name", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "tech-specific-elasticsearch", + "type": "string" + }, + { + "brief": "Represents the human-readable identifier of the node/instance to which a request was routed.\n", + "examples": [ + "instance-0000000001" + ], + "name": "db.elasticsearch.node.name", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "tech-specific-elasticsearch", + "type": "string" + }, + { + "brief": "A dynamic value in the url path.\n", + "examples": [ + "db.elasticsearch.path_parts.index=test-index", + "db.elasticsearch.path_parts.doc_id=123" + ], + "name": "db.elasticsearch.path_parts", + "note": "Many Elasticsearch url paths allow dynamic values. These SHOULD be recorded in span attributes in the format `db.elasticsearch.path_parts.\u003ckey\u003e`, where `\u003ckey\u003e` is the url path part name. The implementation SHOULD reference the [elasticsearch schema](https://raw.githubusercontent.com/elastic/elasticsearch-specification/main/output/schema/schema.json) in order to map the path part values to their names.\n", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "tech-specific-elasticsearch", + "type": "template[string]" + }, + { + "brief": "An identifier (address, unique name, or any other identifier) of the database instance that is executing queries or mutations on the current connection. This is useful in cases where the database is running in a clustered environment and the instrumentation is able to record the node executing the query. The client may obtain this value in databases like MySQL using queries like `select @@hostname`.\n", + "examples": "mysql-e26b99z.example.com", + "name": "db.instance.id", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "db-generic", + "type": "string" + }, + { + "brief": "The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect.\n", + "examples": [ + "org.postgresql.Driver", + "com.microsoft.sqlserver.jdbc.SQLServerDriver" + ], + "name": "db.jdbc.driver_classname", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "tech-specific-jdbc", + "type": "string" + }, + { + "brief": "The MongoDB collection being accessed within the database stated in `db.name`.\n", + "examples": [ + "customers", + "products" + ], + "name": "db.mongodb.collection", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "tech-specific-mongodb", + "type": "string" + }, + { + "brief": "The Microsoft SQL Server [instance name](https://docs.microsoft.com/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance.\n", + "examples": "MSSQLSERVER", + "name": "db.mssql.instance_name", + "note": "If setting a `db.mssql.instance_name`, `server.port` is no longer required (but still recommended if non-standard).\n", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "tech-specific-mssql", + "type": "string" + }, + { + "brief": "This attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails).\n", + "examples": [ + "customers", + "main" + ], + "name": "db.name", + "note": "In some SQL databases, the database name to be used is called \"schema name\". In case there are multiple layers that could be considered for database name (e.g. Oracle instance name and schema name), the database name to be used is the more specific layer (e.g. Oracle schema name).\n", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "db-generic", + "type": "string" + }, + { + "brief": "The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword.\n", + "examples": [ + "findAndModify", + "HMSET", + "SELECT" + ], + "name": "db.operation", + "note": "When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted.\n", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "db-generic", + "type": "string" + }, + { + "brief": "The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute.\n", + "examples": [ + 0, + 1, + 15 + ], + "name": "db.redis.database_index", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "tech-specific-redis", + "type": "int" + }, + { + "brief": "The name of the primary table that the operation is acting upon, including the database name (if applicable).", + "examples": [ + "public.users", + "customers" + ], + "name": "db.sql.table", + "note": "It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "tech-specific-sql", + "type": "string" + }, + { + "brief": "The database statement being executed.\n", + "examples": [ + "SELECT * FROM wuser_table", + "SET mykey \"WuValue\"" + ], + "name": "db.statement", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "db-generic", + "type": "string" + }, + { + "brief": "An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.", + "name": "db.system", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "db-generic", + "type": { + "allow_custom_values": null, + "members": [ + { + "brief": "Microsoft SQL Server", + "deprecated": null, + "id": "mssql", + "note": null, + "stability": "stable", + "value": "mssql" + }, + { + "brief": "MySQL", + "deprecated": null, + "id": "mysql", + "note": null, + "stability": "stable", + "value": "mysql" + }, + { + "brief": "Oracle Database", + "deprecated": null, + "id": "oracle", + "note": null, + "stability": "stable", + "value": "oracle" + }, + { + "brief": "IBM Db2", + "deprecated": null, + "id": "db2", + "note": null, + "stability": "stable", + "value": "db2" + }, + { + "brief": "PostgreSQL", + "deprecated": null, + "id": "postgresql", + "note": null, + "stability": "stable", + "value": "postgresql" + }, + { + "brief": "Amazon Redshift", + "deprecated": null, + "id": "redshift", + "note": null, + "stability": "stable", + "value": "redshift" + }, + { + "brief": "Apache Hive", + "deprecated": null, + "id": "hive", + "note": null, + "stability": "stable", + "value": "hive" + }, + { + "brief": "Cloudscape", + "deprecated": null, + "id": "cloudscape", + "note": null, + "stability": "stable", + "value": "cloudscape" + }, + { + "brief": "HyperSQL DataBase", + "deprecated": null, + "id": "hsqldb", + "note": null, + "stability": "stable", + "value": "hsqldb" + }, + { + "brief": "Progress Database", + "deprecated": null, + "id": "progress", + "note": null, + "stability": "stable", + "value": "progress" + }, + { + "brief": "SAP MaxDB", + "deprecated": null, + "id": "maxdb", + "note": null, + "stability": "stable", + "value": "maxdb" + }, + { + "brief": "SAP HANA", + "deprecated": null, + "id": "hanadb", + "note": null, + "stability": "stable", + "value": "hanadb" + }, + { + "brief": "Ingres", + "deprecated": null, + "id": "ingres", + "note": null, + "stability": "stable", + "value": "ingres" + }, + { + "brief": "FirstSQL", + "deprecated": null, + "id": "firstsql", + "note": null, + "stability": "stable", + "value": "firstsql" + }, + { + "brief": "EnterpriseDB", + "deprecated": null, + "id": "edb", + "note": null, + "stability": "stable", + "value": "edb" + }, + { + "brief": "InterSystems Caché", + "deprecated": null, + "id": "cache", + "note": null, + "stability": "stable", + "value": "cache" + }, + { + "brief": "Adabas (Adaptable Database System)", + "deprecated": null, + "id": "adabas", + "note": null, + "stability": "stable", + "value": "adabas" + }, + { + "brief": "Firebird", + "deprecated": null, + "id": "firebird", + "note": null, + "stability": "stable", + "value": "firebird" + }, + { + "brief": "Apache Derby", + "deprecated": null, + "id": "derby", + "note": null, + "stability": "stable", + "value": "derby" + }, + { + "brief": "FileMaker", + "deprecated": null, + "id": "filemaker", + "note": null, + "stability": "stable", + "value": "filemaker" + }, + { + "brief": "Informix", + "deprecated": null, + "id": "informix", + "note": null, + "stability": "stable", + "value": "informix" + }, + { + "brief": "InstantDB", + "deprecated": null, + "id": "instantdb", + "note": null, + "stability": "stable", + "value": "instantdb" + }, + { + "brief": "InterBase", + "deprecated": null, + "id": "interbase", + "note": null, + "stability": "stable", + "value": "interbase" + }, + { + "brief": "MariaDB", + "deprecated": null, + "id": "mariadb", + "note": null, + "stability": "stable", + "value": "mariadb" + }, + { + "brief": "Netezza", + "deprecated": null, + "id": "netezza", + "note": null, + "stability": "stable", + "value": "netezza" + }, + { + "brief": "Pervasive PSQL", + "deprecated": null, + "id": "pervasive", + "note": null, + "stability": "stable", + "value": "pervasive" + }, + { + "brief": "PointBase", + "deprecated": null, + "id": "pointbase", + "note": null, + "stability": "stable", + "value": "pointbase" + }, + { + "brief": "SQLite", + "deprecated": null, + "id": "sqlite", + "note": null, + "stability": "stable", + "value": "sqlite" + }, + { + "brief": "Sybase", + "deprecated": null, + "id": "sybase", + "note": null, + "stability": "stable", + "value": "sybase" + }, + { + "brief": "Teradata", + "deprecated": null, + "id": "teradata", + "note": null, + "stability": "stable", + "value": "teradata" + }, + { + "brief": "Vertica", + "deprecated": null, + "id": "vertica", + "note": null, + "stability": "stable", + "value": "vertica" + }, + { + "brief": "H2", + "deprecated": null, + "id": "h2", + "note": null, + "stability": "stable", + "value": "h2" + }, + { + "brief": "ColdFusion IMQ", + "deprecated": null, + "id": "coldfusion", + "note": null, + "stability": "stable", + "value": "coldfusion" + }, + { + "brief": "Apache Cassandra", + "deprecated": null, + "id": "cassandra", + "note": null, + "stability": "stable", + "value": "cassandra" + }, + { + "brief": "Apache HBase", + "deprecated": null, + "id": "hbase", + "note": null, + "stability": "stable", + "value": "hbase" + }, + { + "brief": "MongoDB", + "deprecated": null, + "id": "mongodb", + "note": null, + "stability": "stable", + "value": "mongodb" + }, + { + "brief": "Redis", + "deprecated": null, + "id": "redis", + "note": null, + "stability": "stable", + "value": "redis" + }, + { + "brief": "Couchbase", + "deprecated": null, + "id": "couchbase", + "note": null, + "stability": "stable", + "value": "couchbase" + }, + { + "brief": "CouchDB", + "deprecated": null, + "id": "couchdb", + "note": null, + "stability": "stable", + "value": "couchdb" + }, + { + "brief": "Microsoft Azure Cosmos DB", + "deprecated": null, + "id": "cosmosdb", + "note": null, + "stability": "stable", + "value": "cosmosdb" + }, + { + "brief": "Amazon DynamoDB", + "deprecated": null, + "id": "dynamodb", + "note": null, + "stability": "stable", + "value": "dynamodb" + }, + { + "brief": "Neo4j", + "deprecated": null, + "id": "neo4j", + "note": null, + "stability": "stable", + "value": "neo4j" + }, + { + "brief": "Apache Geode", + "deprecated": null, + "id": "geode", + "note": null, + "stability": "stable", + "value": "geode" + }, + { + "brief": "Elasticsearch", + "deprecated": null, + "id": "elasticsearch", + "note": null, + "stability": "stable", + "value": "elasticsearch" + }, + { + "brief": "Memcached", + "deprecated": null, + "id": "memcached", + "note": null, + "stability": "stable", + "value": "memcached" + }, + { + "brief": "CockroachDB", + "deprecated": null, + "id": "cockroachdb", + "note": null, + "stability": "stable", + "value": "cockroachdb" + }, + { + "brief": "OpenSearch", + "deprecated": null, + "id": "opensearch", + "note": null, + "stability": "stable", + "value": "opensearch" + }, + { + "brief": "ClickHouse", + "deprecated": null, + "id": "clickhouse", + "note": null, + "stability": "stable", + "value": "clickhouse" + }, + { + "brief": "Cloud Spanner", + "deprecated": null, + "id": "spanner", + "note": null, + "stability": "stable", + "value": "spanner" + }, + { + "brief": "Trino", + "deprecated": null, + "id": "trino", + "note": null, + "stability": "stable", + "value": "trino" + } + ] + } + }, + { + "brief": "Username for accessing the database.\n", + "examples": [ + "readonly_user", + "reporting_user" + ], + "name": "db.user", + "requirement_level": "recommended", + "root_namespace": "db", + "stability": "stable", + "tag": "db-generic", + "type": "string" + } + ], + "root_namespace": "db" + }, + { + "attributes": [ + { + "brief": "SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.\n", + "name": "exception.escaped", + "note": "An exception is considered to have escaped (or left) the scope of a span,\nif that span is ended while the exception is still logically \"in flight\".\nThis may be actually \"in flight\" in some languages (e.g. if the exception\nis passed to a Context manager\u0027s `__exit__` method in Python) but will\nusually be caught at the point of recording the exception in most languages.\n\nIt is usually not possible to determine at the point where an exception is thrown\nwhether it will escape the scope of a span.\nHowever, it is trivial to know that an exception\nwill escape, if one checks for an active exception just before ending the span,\nas done in the [example for recording span exceptions](https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans/#recording-an-exception).\n\nIt follows that an exception may still escape the scope of the span\neven if the `exception.escaped` attribute was not set or set to false,\nsince the event might have been recorded at a time where it was not\nclear whether the exception will escape.", + "requirement_level": "recommended", + "root_namespace": "exception", + "stability": "stable", + "type": "boolean" + }, + { + "brief": "The exception message.", + "examples": [ + "Division by zero", + "Can\u0027t convert \u0027int\u0027 object to str implicitly" + ], + "name": "exception.message", + "requirement_level": "recommended", + "root_namespace": "exception", + "stability": "stable", + "type": "string" + }, + { + "brief": "A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.\n", + "examples": "Exception in thread \"main\" java.lang.RuntimeException: Test exception\\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at com.example.GenerateTrace.main(GenerateTrace.java:5)", + "name": "exception.stacktrace", + "requirement_level": "recommended", + "root_namespace": "exception", + "stability": "stable", + "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.\n", + "examples": [ + "java.net.ConnectException", + "OSError" + ], + "name": "exception.type", + "requirement_level": "recommended", + "root_namespace": "exception", + "stability": "stable", + "type": "string" + } + ], + "root_namespace": "exception" + }, + { + "attributes": [ + { + "brief": "HTTP request headers, `\u003ckey\u003e` being the normalized HTTP Header name (lowercase), the value being the header values.\n", + "examples": [ + [ + "application/json" + ], + [ + "1.2.3.4", + "1.2.3.5" + ] + ], + "name": "http.request.header", + "note": "Instrumentations SHOULD require an explicit configuration of which headers are to be captured. Including all request headers can be a security risk - explicit configuration helps avoid leaking sensitive information.\nThe `User-Agent` header is already captured in the `user_agent.original` attribute. Users MAY explicitly configure instrumentations to capture them even though it is not recommended.\nThe attribute value MUST consist of either multiple header values as an array of strings or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers.\n", + "requirement_level": "recommended", + "root_namespace": "http", + "stability": "stable", + "type": "template[string[]]" + }, + { + "brief": "HTTP request method.", + "examples": [ + "GET", + "POST", + "HEAD" + ], + "name": "http.request.method", + "note": "HTTP request method value SHOULD be \"known\" to the instrumentation.\nBy default, this convention defines \"known\" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)\nand the PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html).\n\nIf the HTTP request method is not known to instrumentation, it MUST set the `http.request.method` attribute to `_OTHER`.\n\nIf the HTTP instrumentation could end up converting valid HTTP request methods to `_OTHER`, then it MUST provide a way to override\nthe list of known HTTP methods. If this override is done via environment variable, then the environment variable MUST be named\nOTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP methods\n(this list MUST be a full override of the default known method, it is not a list of known methods in addition to the defaults).\n\nHTTP method names are case-sensitive and `http.request.method` attribute value MUST match a known HTTP method name exactly.\nInstrumentations for specific web frameworks that consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent.\nTracing instrumentations that do so, MUST also set `http.request.method_original` to the original value.\n", + "requirement_level": "recommended", + "root_namespace": "http", + "stability": "stable", + "type": { + "allow_custom_values": null, + "members": [ + { + "brief": "CONNECT method.", + "deprecated": null, + "id": "connect", + "note": null, + "stability": "stable", + "value": "CONNECT" + }, + { + "brief": "DELETE method.", + "deprecated": null, + "id": "delete", + "note": null, + "stability": "stable", + "value": "DELETE" + }, + { + "brief": "GET method.", + "deprecated": null, + "id": "get", + "note": null, + "stability": "stable", + "value": "GET" + }, + { + "brief": "HEAD method.", + "deprecated": null, + "id": "head", + "note": null, + "stability": "stable", + "value": "HEAD" + }, + { + "brief": "OPTIONS method.", + "deprecated": null, + "id": "options", + "note": null, + "stability": "stable", + "value": "OPTIONS" + }, + { + "brief": "PATCH method.", + "deprecated": null, + "id": "patch", + "note": null, + "stability": "stable", + "value": "PATCH" + }, + { + "brief": "POST method.", + "deprecated": null, + "id": "post", + "note": null, + "stability": "stable", + "value": "POST" + }, + { + "brief": "PUT method.", + "deprecated": null, + "id": "put", + "note": null, + "stability": "stable", + "value": "PUT" + }, + { + "brief": "TRACE method.", + "deprecated": null, + "id": "trace", + "note": null, + "stability": "stable", + "value": "TRACE" + }, + { + "brief": "Any HTTP method that the instrumentation has no prior knowledge of.", + "deprecated": null, + "id": "other", + "note": null, + "stability": "stable", + "value": "_OTHER" + } + ] + } + }, + { + "brief": "Original HTTP method sent by the client in the request line.", + "examples": [ + "GeT", + "ACL", + "foo" + ], + "name": "http.request.method_original", + "requirement_level": "recommended", + "root_namespace": "http", + "stability": "stable", + "type": "string" + }, + { + "brief": "The ordinal number of request resending attempt (for any reason, including redirects).\n", + "examples": 3, + "name": "http.request.resend_count", + "note": "The resend count SHOULD be updated each time an HTTP request gets resent by the client, regardless of what was the cause of the resending (e.g. redirection, authorization failure, 503 Server Unavailable, network issues, or any other).\n", + "requirement_level": "recommended", + "root_namespace": "http", + "stability": "stable", + "type": "int" + }, + { + "brief": "HTTP response headers, `\u003ckey\u003e` being the normalized HTTP Header name (lowercase), the value being the header values.\n", + "examples": [ + [ + "application/json" + ], + [ + "abc", + "def" + ] + ], + "name": "http.response.header", + "note": "Instrumentations SHOULD require an explicit configuration of which headers are to be captured. Including all response headers can be a security risk - explicit configuration helps avoid leaking sensitive information.\nUsers MAY explicitly configure instrumentations to capture them even though it is not recommended.\nThe attribute value MUST consist of either multiple header values as an array of strings or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers.\n", + "requirement_level": "recommended", + "root_namespace": "http", + "stability": "stable", + "type": "template[string[]]" + }, + { + "brief": "[HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).", + "examples": [ + 200 + ], + "name": "http.response.status_code", + "requirement_level": "recommended", + "root_namespace": "http", + "stability": "stable", + "type": "int" + }, + { + "brief": "The matched route, that is, the path template in the format used by the respective server framework.\n", + "examples": [ + "/users/:userID?", + "{controller}/{action}/{id?}" + ], + "name": "http.route", + "note": "MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it.\nSHOULD include the [application root](/docs/http/http-spans.md#http-server-definitions) if there is one.", + "requirement_level": "recommended", + "root_namespace": "http", + "stability": "stable", + "type": "string" + } + ], + "root_namespace": "http" + }, + { + "attributes": [ + { + "brief": "Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client.\n", + "examples": [ + "CERN-LineMode/2.15 libwww/2.17b3", + "Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1" + ], + "name": "user_agent.original", + "requirement_level": "recommended", + "root_namespace": "user_agent", + "stability": "stable", + "type": "string" + } + ], + "root_namespace": "user_agent" + } +] \ No newline at end of file diff --git a/crates/weaver_forge/expected_output/semconv_jq_fn/semconv_grouped_attributes_stable.json b/crates/weaver_forge/expected_output/semconv_jq_fn/semconv_grouped_attributes_stable.json index 4e9612ea5..903fed518 100644 --- a/crates/weaver_forge/expected_output/semconv_jq_fn/semconv_grouped_attributes_stable.json +++ b/crates/weaver_forge/expected_output/semconv_jq_fn/semconv_grouped_attributes_stable.json @@ -429,14 +429,6 @@ "type": { "allow_custom_values": null, "members": [ - { - "brief": "Some other SQL database. Fallback only. See notes.", - "deprecated": null, - "id": "other_sql", - "note": null, - "stability": "stable", - "value": "other_sql" - }, { "brief": "Microsoft SQL Server", "deprecated": null, @@ -445,14 +437,6 @@ "stability": "stable", "value": "mssql" }, - { - "brief": "Microsoft SQL Server Compact", - "deprecated": null, - "id": "mssqlcompact", - "note": null, - "stability": "stable", - "value": "mssqlcompact" - }, { "brief": "MySQL", "deprecated": null, @@ -951,7 +935,7 @@ "deprecated": null, "id": "connect", "note": null, - "stability": "development", + "stability": "stable", "value": "CONNECT" }, { @@ -959,7 +943,7 @@ "deprecated": null, "id": "delete", "note": null, - "stability": "development", + "stability": "stable", "value": "DELETE" }, { @@ -967,7 +951,7 @@ "deprecated": null, "id": "get", "note": null, - "stability": "development", + "stability": "stable", "value": "GET" }, { @@ -975,7 +959,7 @@ "deprecated": null, "id": "head", "note": null, - "stability": "development", + "stability": "stable", "value": "HEAD" }, { @@ -983,7 +967,7 @@ "deprecated": null, "id": "options", "note": null, - "stability": "development", + "stability": "stable", "value": "OPTIONS" }, { @@ -991,7 +975,7 @@ "deprecated": null, "id": "patch", "note": null, - "stability": "development", + "stability": "stable", "value": "PATCH" }, { @@ -999,7 +983,7 @@ "deprecated": null, "id": "post", "note": null, - "stability": "development", + "stability": "stable", "value": "POST" }, { @@ -1007,7 +991,7 @@ "deprecated": null, "id": "put", "note": null, - "stability": "development", + "stability": "stable", "value": "PUT" }, { @@ -1015,7 +999,7 @@ "deprecated": null, "id": "trace", "note": null, - "stability": "development", + "stability": "stable", "value": "TRACE" }, { @@ -1023,7 +1007,7 @@ "deprecated": null, "id": "other", "note": null, - "stability": "development", + "stability": "stable", "value": "_OTHER" } ] diff --git a/crates/weaver_forge/templates/semconv_jq_fn/semconv_grouped_attributes_not_experimental.json b/crates/weaver_forge/templates/semconv_jq_fn/semconv_grouped_attributes_not_experimental.json new file mode 100644 index 000000000..12ce274ff --- /dev/null +++ b/crates/weaver_forge/templates/semconv_jq_fn/semconv_grouped_attributes_not_experimental.json @@ -0,0 +1 @@ +{{ ctx | tojson(indent=true) }} \ No newline at end of file diff --git a/crates/weaver_forge/templates/semconv_jq_fn/weaver.yaml b/crates/weaver_forge/templates/semconv_jq_fn/weaver.yaml index a7284e2f5..8cfb20b8e 100644 --- a/crates/weaver_forge/templates/semconv_jq_fn/weaver.yaml +++ b/crates/weaver_forge/templates/semconv_jq_fn/weaver.yaml @@ -16,6 +16,13 @@ templates: "stable_only": true }) application_mode: single + - template: semconv_grouped_attributes_not_experimental.json + filter: > + semconv_grouped_attributes({ + "exclude_root_namespace": $excluded_namespaces, + "exclude_stability": ["experimental"], + }) + application_mode: single - template: semconv_metrics.json filter: > semconv_grouped_metrics({ "stable_only": false }) diff --git a/defaults/jq/semconv.jq b/defaults/jq/semconv.jq index b64c641a0..b88db505e 100644 --- a/defaults/jq/semconv.jq +++ b/defaults/jq/semconv.jq @@ -17,12 +17,16 @@ def expand_stability($stability): # - exclude_stability: a list of stability statuses to exclude. Use `stable_only` to exclude all non-stable attributes instead. def stability_filter($options): if $options.stable_only then - map(select(.stability == "stable")) + map( + select(.stability == "stable") + ) + | map(.type.members? |= map(select(.stability == "stable"))) else . end | if $options | has("exclude_stability") then map(select(.stability as $st | expand_stability($options.exclude_stability) | index($st) | not)) + | map(.type.members? |= map(select(.stability as $st | expand_stability($options.exclude_stability) | index($st) | not))) else . end; @@ -44,9 +48,9 @@ def code_generation_exclude_filter($options): else # null coalescence is not supported in jaq (but supported in jq) map(select( - .annotations == null - or .annotations.code_generation == null - or .annotations.code_generation.exclude == null + .annotations == null + or .annotations.code_generation == null + or .annotations.code_generation.exclude == null or .annotations.code_generation.exclude == false )) end;