Skip to content

Commit 8f02500

Browse files
author
Liudmila Molkova
committed
released
1 parent 7cad2f7 commit 8f02500

File tree

6 files changed

+36
-39
lines changed

6 files changed

+36
-39
lines changed

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/azure_attributes.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from typing import Final
16-
17-
18-
19-
20-
2115
from enum import Enum
16+
from typing import Final
2217

2318
AZURE_CLIENT_ID: Final = "azure.client.id"
2419
"""
@@ -35,13 +30,17 @@
3530
Account or request [consistency level](https://learn.microsoft.com/azure/cosmos-db/consistency-levels).
3631
"""
3732

38-
AZURE_COSMOSDB_OPERATION_CONTACTED_REGIONS: Final = "azure.cosmosdb.operation.contacted_regions"
33+
AZURE_COSMOSDB_OPERATION_CONTACTED_REGIONS: Final = (
34+
"azure.cosmosdb.operation.contacted_regions"
35+
)
3936
"""
4037
List of regions contacted during operation in the order that they were contacted. If there is more than one region listed, it indicates that the operation was performed on multiple regions i.e. cross-regional call.
4138
Note: Region name matches the format of `displayName` in [Azure Location API](https://learn.microsoft.com/rest/api/subscription/subscriptions/list-locations?view=rest-subscription-2021-10-01&tabs=HTTP#location).
4239
"""
4340

44-
AZURE_COSMOSDB_OPERATION_REQUEST_CHARGE: Final = "azure.cosmosdb.operation.request_charge"
41+
AZURE_COSMOSDB_OPERATION_REQUEST_CHARGE: Final = (
42+
"azure.cosmosdb.operation.request_charge"
43+
)
4544
"""
4645
The number of request units consumed by the operation.
4746
"""
@@ -51,19 +50,21 @@
5150
Request payload size in bytes.
5251
"""
5352

54-
AZURE_COSMOSDB_RESPONSE_SUB_STATUS_CODE: Final = "azure.cosmosdb.response.sub_status_code"
53+
AZURE_COSMOSDB_RESPONSE_SUB_STATUS_CODE: Final = (
54+
"azure.cosmosdb.response.sub_status_code"
55+
)
5556
"""
5657
Cosmos DB sub status code.
5758
"""
5859

5960

60-
6161
class AzureCosmosdbConnectionModeValues(Enum):
6262
GATEWAY = "gateway"
6363
"""Gateway (HTTP) connection."""
6464
DIRECT = "direct"
6565
"""Direct connection."""
6666

67+
6768
class AzureCosmosdbConsistencyLevelValues(Enum):
6869
STRONG = "Strong"
6970
"""strong."""

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/cassandra_attributes.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from typing import Final
16-
17-
18-
19-
20-
2115
from enum import Enum
16+
from typing import Final
2217

2318
CASSANDRA_CONSISTENCY_LEVEL: Final = "cassandra.consistency.level"
2419
"""
@@ -45,13 +40,14 @@
4540
Whether or not the query is idempotent.
4641
"""
4742

48-
CASSANDRA_SPECULATIVE_EXECUTION_COUNT: Final = "cassandra.speculative_execution.count"
43+
CASSANDRA_SPECULATIVE_EXECUTION_COUNT: Final = (
44+
"cassandra.speculative_execution.count"
45+
)
4946
"""
5047
The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.
5148
"""
5249

5350

54-
5551
class CassandraConsistencyLevelValues(Enum):
5652
ALL = "all"
5753
"""all."""

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/elasticsearch_attributes.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,7 @@
1414

1515
from typing import Final
1616

17-
18-
19-
20-
21-
22-
2317
ELASTICSEARCH_NODE_NAME: Final = "elasticsearch.node.name"
2418
"""
2519
Represents the human-readable identifier of the node/instance to which a request was routed.
2620
"""
27-
28-

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/azure_metrics.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,43 +13,47 @@
1313
# limitations under the License.
1414

1515

16-
1716
from typing import Final
1817

19-
from opentelemetry.metrics import Meter
20-
from opentelemetry.metrics import Histogram
21-
from opentelemetry.metrics import UpDownCounter
18+
from opentelemetry.metrics import Histogram, Meter, UpDownCounter
2219

23-
AZURE_COSMOSDB_CLIENT_ACTIVE_INSTANCE_COUNT: Final = "azure.cosmosdb.client.active_instance.count"
20+
AZURE_COSMOSDB_CLIENT_ACTIVE_INSTANCE_COUNT: Final = (
21+
"azure.cosmosdb.client.active_instance.count"
22+
)
2423
"""
2524
Number of active client instances
2625
Instrument: updowncounter
2726
Unit: {instance}
2827
"""
2928

3029

31-
32-
def create_azure_cosmosdb_client_active_instance_count(meter: Meter) -> UpDownCounter:
30+
def create_azure_cosmosdb_client_active_instance_count(
31+
meter: Meter,
32+
) -> UpDownCounter:
3333
"""Number of active client instances"""
3434
return meter.create_up_down_counter(
3535
name=AZURE_COSMOSDB_CLIENT_ACTIVE_INSTANCE_COUNT,
3636
description="Number of active client instances",
3737
unit="{instance}",
3838
)
3939

40-
AZURE_COSMOSDB_CLIENT_OPERATION_REQUEST_CHARGE: Final = "azure.cosmosdb.client.operation.request_charge"
40+
41+
AZURE_COSMOSDB_CLIENT_OPERATION_REQUEST_CHARGE: Final = (
42+
"azure.cosmosdb.client.operation.request_charge"
43+
)
4144
"""
4245
[Request units](https://learn.microsoft.com/azure/cosmos-db/request-units) consumed by the operation
4346
Instrument: histogram
4447
Unit: {request_unit}
4548
"""
4649

4750

48-
49-
def create_azure_cosmosdb_client_operation_request_charge(meter: Meter) -> Histogram:
51+
def create_azure_cosmosdb_client_operation_request_charge(
52+
meter: Meter,
53+
) -> Histogram:
5054
"""[Request units](https://learn.microsoft.com/azure/cosmos-db/request-units) consumed by the operation"""
5155
return meter.create_histogram(
5256
name=AZURE_COSMOSDB_CLIENT_OPERATION_REQUEST_CHARGE,
5357
description="[Request units](https://learn.microsoft.com/azure/cosmos-db/request-units) consumed by the operation",
5458
unit="{request_unit}",
55-
)
59+
)

opentelemetry-semantic-conventions/src/opentelemetry/semconv/schemas.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,9 @@ class Schemas(Enum):
4646
The URL of the OpenTelemetry schema version 1.29.0.
4747
"""
4848

49+
V1_30_0 = "https://opentelemetry.io/schemas/1.30.0"
50+
"""
51+
The URL of the OpenTelemetry schema version 1.30.0.
52+
"""
4953
# when generating new semantic conventions,
5054
# make sure to add new versions version here.

scripts/semconv/generate.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
55
ROOT_DIR="${SCRIPT_DIR}/../.."
66

77
# freeze the spec version to make SemanticAttributes generation reproducible
8-
SEMCONV_VERSION=1.29.0
9-
SEMCONV_VERSION_TAG=main
8+
SEMCONV_VERSION=1.30.0
9+
SEMCONV_VERSION_TAG=v1.30.0
1010
OTEL_WEAVER_IMG_VERSION=v0.12.0
1111
INCUBATING_DIR=_incubating
1212
cd ${SCRIPT_DIR}

0 commit comments

Comments
 (0)