Skip to content

Commit

Permalink
Fix weaver forge tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuereth committed Oct 10, 2024
1 parent e8339e6 commit 7ccf5d2
Show file tree
Hide file tree
Showing 15 changed files with 79 additions and 91 deletions.
9 changes: 4 additions & 5 deletions crates/weaver_forge/data/exception.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
groups:
- id: registry.exception
type: attribute_group
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
stability: stable
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
stability: stable
brief: The exception message.
examples: ["Division by zero", "Can't convert 'int' object to str implicitly"]
- id: stacktrace
- id: exception.stacktrace
type: string
stability: stable
brief: >
Expand All @@ -29,7 +28,7 @@ groups:
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)'
- id: escaped
- id: exception.escaped
type: boolean
stability: stable
brief: >
Expand Down
10 changes: 4 additions & 6 deletions crates/weaver_forge/data/exporter.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
groups:
- id: otel.scope
prefix: otel.scope
type: resource
brief: Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's concepts.
attributes:
- id: name
- id: otel.scope.name
type: string
brief: The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP).
examples: ['io.opentelemetry.contrib.mongodb']
stability: stable
- id: version
- id: otel.scope.version
type: string
brief: The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP).
examples: ['1.0.0']
stability: stable
- id: otel.library
prefix: otel.library
type: resource
brief: >
Span attributes used by non-OTLP exporters to represent OpenTelemetry Scope's concepts.
attributes:
- id: name
- id: otel.library.name
type: string
deprecated: use the `otel.scope.name` attribute.
brief:
examples: ['io.opentelemetry.contrib.mongodb']
- id: version
- id: otel.library.version
type: string
deprecated: use the `otel.scope.version` attribute.
brief:
Expand Down
10 changes: 4 additions & 6 deletions crates/weaver_forge/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
stability: stable
type:
allow_custom_values: false
Expand All @@ -18,7 +17,7 @@ groups:
requirement_level: recommended
brief: The type of memory.
examples: ["heap", "non_heap"]
- id: pool.name
- id: jvm.memory.pool.name
stability: stable
type: string
requirement_level: recommended
Expand Down Expand Up @@ -70,9 +69,8 @@ groups:
brief: "Duration of JVM garbage collection actions."
instrument: histogram
unit: "s"
prefix: jvm.gc
attributes:
- id: name
- id: jvm.gc.name
stability: stable
type: string
requirement_level: recommended
Expand All @@ -81,7 +79,7 @@ groups:
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
stability: stable
type: string
requirement_level: recommended
Expand Down
61 changes: 30 additions & 31 deletions crates/weaver_forge/data/registry-db.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
groups:
- id: registry.db
prefix: db
type: attribute_group
brief: >
This document defines the attributes used to describe telemetry in the context of databases.
attributes:
- id: cassandra.coordinator.dc
- id: db.cassandra.coordinator.dc
type: string
brief: >
The data center of the coordinating node for a query.
examples: 'us-west-2'
tag: tech-specific-cassandra
- id: cassandra.coordinator.id
- id: db.cassandra.coordinator.id
type: string
brief: >
The ID of the coordinating node for a query.
examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af'
tag: tech-specific-cassandra
- id: cassandra.consistency_level
- id: db.cassandra.consistency_level
brief: >
The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).
type:
Expand Down Expand Up @@ -45,24 +44,24 @@ groups:
- id: local_serial
value: 'local_serial'
tag: tech-specific-cassandra
- id: cassandra.idempotence
- id: db.cassandra.idempotence
type: boolean
brief: >
Whether or not the query is idempotent.
tag: tech-specific-cassandra
- id: cassandra.page_size
- id: db.cassandra.page_size
type: int
brief: >
The fetch size used for paging, i.e. how many rows will be returned at once.
examples: [5000]
tag: tech-specific-cassandra
- id: cassandra.speculative_execution_count
- id: db.cassandra.speculative_execution_count
type: int
brief: >
The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.
examples: [0, 2]
tag: tech-specific-cassandra
- id: cassandra.table
- id: db.cassandra.table
type: string
brief: The name of the primary Cassandra table that the operation is acting upon, including the keyspace name (if applicable).
note: >
Expand All @@ -74,19 +73,19 @@ groups:
value MUST NOT be set.
examples: 'mytable'
tag: tech-specific-cassandra
- id: connection_string
- id: db.connection_string
type: string
brief: >
The connection string used to connect to the database.
It is recommended to remove embedded credentials.
examples: 'Server=(localdb)\v11.0;Integrated Security=true;'
tag: db-generic
- id: cosmosdb.client_id
- id: db.cosmosdb.client_id
type: string
brief: Unique Cosmos client instance id.
examples: '3ba4827d-4422-483f-b59f-85b74211c11d'
tag: tech-specific-cosmosdb
- id: cosmosdb.connection_mode
- id: db.cosmosdb.connection_mode
type:
allow_custom_values: false
members:
Expand All @@ -98,12 +97,12 @@ groups:
brief: Direct connection.
brief: Cosmos client connection mode.
tag: tech-specific-cosmosdb
- id: cosmosdb.container
- id: db.cosmosdb.container
type: string
brief: Cosmos DB container name.
examples: 'anystring'
tag: tech-specific-cosmosdb
- id: cosmosdb.operation_type
- id: db.cosmosdb.operation_type
type:
allow_custom_values: true
members:
Expand Down Expand Up @@ -139,38 +138,38 @@ groups:
value: 'ExecuteJavaScript'
brief: CosmosDB Operation Type.
tag: tech-specific-cosmosdb
- id: cosmosdb.request_charge
- id: db.cosmosdb.request_charge
type: double
brief: RU consumed for that operation
examples: [46.18, 1.0]
tag: tech-specific-cosmosdb
- id: cosmosdb.request_content_length
- id: db.cosmosdb.request_content_length
type: int
brief: Request payload size in bytes
tag: tech-specific-cosmosdb
- id: cosmosdb.status_code
- id: db.cosmosdb.status_code
type: int
brief: Cosmos DB status code.
examples: [200, 201]
tag: tech-specific-cosmosdb
- id: cosmosdb.sub_status_code
- id: db.cosmosdb.sub_status_code
type: int
brief: Cosmos DB sub status code.
examples: [1000, 1002]
tag: tech-specific-cosmosdb
- id: elasticsearch.cluster.name
- id: db.elasticsearch.cluster.name
type: string
brief: >
Represents the identifier of an Elasticsearch cluster.
examples: ["e9106fc68e3044f0b1475b04bf4ffd5f"]
tag: tech-specific-elasticsearch
- id: elasticsearch.node.name
- id: db.elasticsearch.node.name
type: string
brief: >
Represents the human-readable identifier of the node/instance to which a request was routed.
examples: ["instance-0000000001"]
tag: tech-specific-elasticsearch
- id: elasticsearch.path_parts
- id: db.elasticsearch.path_parts
type: template[string]
brief: >
A dynamic value in the url path.
Expand All @@ -181,19 +180,19 @@ groups:
in order to map the path part values to their names.
examples: ['db.elasticsearch.path_parts.index=test-index', 'db.elasticsearch.path_parts.doc_id=123']
tag: tech-specific-elasticsearch
- id: jdbc.driver_classname
- id: db.jdbc.driver_classname
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.
examples: ['org.postgresql.Driver', 'com.microsoft.sqlserver.jdbc.SQLServerDriver']
tag: tech-specific-jdbc
- id: mongodb.collection
- id: db.mongodb.collection
type: string
brief: >
The MongoDB collection being accessed within the database stated in `db.name`.
examples: [ 'customers', 'products' ]
tag: tech-specific-mongodb
- id: mssql.instance_name
- id: db.mssql.instance_name
type: string
note: >
If setting a `db.mssql.instance_name`, `server.port` is no longer
Expand All @@ -203,7 +202,7 @@ groups:
connecting to. This name is used to determine the port of a named instance.
examples: 'MSSQLSERVER'
tag: tech-specific-mssql
- id: name
- id: db.name
type: string
brief: >
This attribute is used to report the name of the database being accessed.
Expand All @@ -216,7 +215,7 @@ groups:
the database name to be used is the more specific layer (e.g. Oracle schema name).
examples: [ 'customers', 'main' ]
tag: db-generic
- id: operation
- id: db.operation
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)
Expand All @@ -230,14 +229,14 @@ groups:
than one operation, this value may be omitted.
examples: ['findAndModify', 'HMSET', 'SELECT']
tag: db-generic
- id: redis.database_index
- id: db.redis.database_index
type: int
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.
examples: [0, 1, 15]
tag: tech-specific-redis
- id: sql.table
- id: db.sql.table
type: string
brief: The name of the primary table that the operation is acting upon, including the database name (if applicable).
note: >
Expand All @@ -248,13 +247,13 @@ groups:
value MUST NOT be set.
examples: ['public.users', 'customers']
tag: tech-specific-sql
- id: statement
- id: db.statement
type: string
brief: >
The database statement being executed.
examples: ['SELECT * FROM wuser_table', 'SET mykey "WuValue"']
tag: db-generic
- id: system
- 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
Expand Down Expand Up @@ -416,13 +415,13 @@ groups:
value: 'trino'
brief: 'Trino'
tag: db-generic
- id: user
- id: db.user
type: string
brief: >
Username for accessing the database.
examples: ['readonly_user', 'reporting_user']
tag: db-generic
- id: instance.id
- id: db.instance.id
tag: db-generic
type: string
brief: >
Expand Down
Loading

0 comments on commit 7ccf5d2

Please sign in to comment.