Skip to content

Commit 7cad2f7

Browse files
author
Liudmila Molkova
committed
update
1 parent bca57eb commit 7cad2f7

File tree

8 files changed

+367
-47
lines changed

8 files changed

+367
-47
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Copyright The OpenTelemetry Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from typing import Final
16+
17+
18+
19+
20+
21+
from enum import Enum
22+
23+
AZURE_CLIENT_ID: Final = "azure.client.id"
24+
"""
25+
The unique identifier of the client instance.
26+
"""
27+
28+
AZURE_COSMOSDB_CONNECTION_MODE: Final = "azure.cosmosdb.connection.mode"
29+
"""
30+
Cosmos client connection mode.
31+
"""
32+
33+
AZURE_COSMOSDB_CONSISTENCY_LEVEL: Final = "azure.cosmosdb.consistency.level"
34+
"""
35+
Account or request [consistency level](https://learn.microsoft.com/azure/cosmos-db/consistency-levels).
36+
"""
37+
38+
AZURE_COSMOSDB_OPERATION_CONTACTED_REGIONS: Final = "azure.cosmosdb.operation.contacted_regions"
39+
"""
40+
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.
41+
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).
42+
"""
43+
44+
AZURE_COSMOSDB_OPERATION_REQUEST_CHARGE: Final = "azure.cosmosdb.operation.request_charge"
45+
"""
46+
The number of request units consumed by the operation.
47+
"""
48+
49+
AZURE_COSMOSDB_REQUEST_BODY_SIZE: Final = "azure.cosmosdb.request.body.size"
50+
"""
51+
Request payload size in bytes.
52+
"""
53+
54+
AZURE_COSMOSDB_RESPONSE_SUB_STATUS_CODE: Final = "azure.cosmosdb.response.sub_status_code"
55+
"""
56+
Cosmos DB sub status code.
57+
"""
58+
59+
60+
61+
class AzureCosmosdbConnectionModeValues(Enum):
62+
GATEWAY = "gateway"
63+
"""Gateway (HTTP) connection."""
64+
DIRECT = "direct"
65+
"""Direct connection."""
66+
67+
class AzureCosmosdbConsistencyLevelValues(Enum):
68+
STRONG = "Strong"
69+
"""strong."""
70+
BOUNDED_STALENESS = "BoundedStaleness"
71+
"""bounded_staleness."""
72+
SESSION = "Session"
73+
"""session."""
74+
EVENTUAL = "Eventual"
75+
"""eventual."""
76+
CONSISTENT_PREFIX = "ConsistentPrefix"
77+
"""consistent_prefix."""
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Copyright The OpenTelemetry Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from typing import Final
16+
17+
18+
19+
20+
21+
from enum import Enum
22+
23+
CASSANDRA_CONSISTENCY_LEVEL: Final = "cassandra.consistency.level"
24+
"""
25+
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).
26+
"""
27+
28+
CASSANDRA_COORDINATOR_DC: Final = "cassandra.coordinator.dc"
29+
"""
30+
The data center of the coordinating node for a query.
31+
"""
32+
33+
CASSANDRA_COORDINATOR_ID: Final = "cassandra.coordinator.id"
34+
"""
35+
The ID of the coordinating node for a query.
36+
"""
37+
38+
CASSANDRA_PAGE_SIZE: Final = "cassandra.page.size"
39+
"""
40+
The fetch size used for paging, i.e. how many rows will be returned at once.
41+
"""
42+
43+
CASSANDRA_QUERY_IDEMPOTENT: Final = "cassandra.query.idempotent"
44+
"""
45+
Whether or not the query is idempotent.
46+
"""
47+
48+
CASSANDRA_SPECULATIVE_EXECUTION_COUNT: Final = "cassandra.speculative_execution.count"
49+
"""
50+
The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.
51+
"""
52+
53+
54+
55+
class CassandraConsistencyLevelValues(Enum):
56+
ALL = "all"
57+
"""all."""
58+
EACH_QUORUM = "each_quorum"
59+
"""each_quorum."""
60+
QUORUM = "quorum"
61+
"""quorum."""
62+
LOCAL_QUORUM = "local_quorum"
63+
"""local_quorum."""
64+
ONE = "one"
65+
"""one."""
66+
TWO = "two"
67+
"""two."""
68+
THREE = "three"
69+
"""three."""
70+
LOCAL_ONE = "local_one"
71+
"""local_one."""
72+
ANY = "any"
73+
"""any."""
74+
SERIAL = "serial"
75+
"""serial."""
76+
LOCAL_SERIAL = "local_serial"
77+
"""local_serial."""

0 commit comments

Comments
 (0)