Skip to content

Commit 9452789

Browse files
authored
Merge branch 'main' into add-scope-config
2 parents 784b0d4 + 6603c3a commit 9452789

33 files changed

+2534
-158
lines changed

api/include/opentelemetry/semconv/exception_attributes.h

+6-14
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,13 @@ namespace exception
2020
{
2121

2222
/**
23-
* SHOULD be set to true if the exception event is recorded at a point where it is known that the
24-
* exception is escaping the scope of the span. <p> An exception is considered to have escaped (or
25-
* left) the scope of a span, if that span is ended while the exception is still logically "in
26-
* flight". This may be actually "in flight" in some languages (e.g. if the exception is passed to a
27-
* Context manager's @code __exit__ @endcode method in Python) but will usually be caught at the
28-
* point of recording the exception in most languages. <p> It is usually not possible to determine
29-
* at the point where an exception is thrown whether it will escape the scope of a span. However, it
30-
* is trivial to know that an exception will escape, if one checks for an active exception just
31-
* before ending the span, as done in the <a
32-
* href="https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans/#recording-an-exception">example
33-
* for recording span exceptions</a>. <p> It follows that an exception may still escape the scope of
34-
* the span even if the @code exception.escaped @endcode attribute was not set or set to false,
35-
* since the event might have been recorded at a time where it was not
36-
* clear whether the exception will escape.
23+
* Indicates that the exception is escaping the scope of the span.
24+
* <p>
25+
* @deprecated
26+
* It's no longer recommended to record exceptions that are handled and do not escape the scope of a
27+
* span.
3728
*/
29+
OPENTELEMETRY_DEPRECATED
3830
static constexpr const char *kExceptionEscaped = "exception.escaped";
3931

4032
/**

api/include/opentelemetry/semconv/incubating/artifact_attributes.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ static constexpr const char *kArtifactAttestationFilename = "artifact.attestatio
2929

3030
/**
3131
* The full <a href="https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf">hash value (see
32-
* glossary)</a>, of the built attestation. Some envelopes in the software attestation space also
33-
* refer to this as the <a
34-
* href="https://github.com/in-toto/attestation/blob/main/spec/README.md#in-toto-attestation-framework-spec">digest</a>.
32+
* glossary)</a>, of the built attestation. Some envelopes in the <a
33+
* href="https://github.com/in-toto/attestation/tree/main/spec">software attestation space</a> also
34+
* refer to this as the <strong>digest</strong>.
3535
*/
3636
static constexpr const char *kArtifactAttestationHash = "artifact.attestation.hash";
3737

api/include/opentelemetry/semconv/incubating/aws_attributes.h

+7-2
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ static constexpr const char *kAwsEcsTaskRevision = "aws.ecs.task.revision";
186186
*/
187187
static constexpr const char *kAwsEksClusterArn = "aws.eks.cluster.arn";
188188

189+
/**
190+
* The AWS extended request ID as returned in the response header @code x-amz-id-2 @endcode.
191+
*/
192+
static constexpr const char *kAwsExtendedRequestId = "aws.extended_request_id";
193+
189194
/**
190195
* The full invoked ARN as provided on the @code Context @endcode passed to the function (@code
191196
* Lambda-Runtime-Invoked-Function-Arn @endcode header on the @code /runtime/invocation/next
@@ -227,8 +232,8 @@ static constexpr const char *kAwsLogStreamArns = "aws.log.stream.arns";
227232
static constexpr const char *kAwsLogStreamNames = "aws.log.stream.names";
228233

229234
/**
230-
* The AWS request ID as returned in the response headers @code x-amz-request-id @endcode or @code
231-
* x-amz-requestid @endcode.
235+
* The AWS request ID as returned in the response headers @code x-amzn-requestid @endcode, @code
236+
* x-amzn-request-id @endcode or @code x-amz-request-id @endcode.
232237
*/
233238
static constexpr const char *kAwsRequestId = "aws.request_id";
234239

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/*
7+
* DO NOT EDIT, this is an Auto-generated file from:
8+
* buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2
9+
*/
10+
11+
#pragma once
12+
13+
#include "opentelemetry/common/macros.h"
14+
#include "opentelemetry/version.h"
15+
16+
OPENTELEMETRY_BEGIN_NAMESPACE
17+
namespace semconv
18+
{
19+
namespace azure
20+
{
21+
22+
/**
23+
* The unique identifier of the client instance.
24+
*/
25+
static constexpr const char *kAzureClientId = "azure.client.id";
26+
27+
/**
28+
* Cosmos client connection mode.
29+
*/
30+
static constexpr const char *kAzureCosmosdbConnectionMode = "azure.cosmosdb.connection.mode";
31+
32+
/**
33+
* Account or request <a
34+
* href="https://learn.microsoft.com/azure/cosmos-db/consistency-levels">consistency level</a>.
35+
*/
36+
static constexpr const char *kAzureCosmosdbConsistencyLevel = "azure.cosmosdb.consistency.level";
37+
38+
/**
39+
* List of regions contacted during operation in the order that they were contacted. If there is
40+
* more than one region listed, it indicates that the operation was performed on multiple regions
41+
* i.e. cross-regional call. <p> Region name matches the format of @code displayName @endcode in <a
42+
* href="https://learn.microsoft.com/rest/api/subscription/subscriptions/list-locations?view=rest-subscription-2021-10-01&tabs=HTTP#location">Azure
43+
* Location API</a>
44+
*/
45+
static constexpr const char *kAzureCosmosdbOperationContactedRegions =
46+
"azure.cosmosdb.operation.contacted_regions";
47+
48+
/**
49+
* The number of request units consumed by the operation.
50+
*/
51+
static constexpr const char *kAzureCosmosdbOperationRequestCharge =
52+
"azure.cosmosdb.operation.request_charge";
53+
54+
/**
55+
* Request payload size in bytes.
56+
*/
57+
static constexpr const char *kAzureCosmosdbRequestBodySize = "azure.cosmosdb.request.body.size";
58+
59+
/**
60+
* Cosmos DB sub status code.
61+
*/
62+
static constexpr const char *kAzureCosmosdbResponseSubStatusCode =
63+
"azure.cosmosdb.response.sub_status_code";
64+
65+
namespace AzureCosmosdbConnectionModeValues
66+
{
67+
/**
68+
* Gateway (HTTP) connection.
69+
*/
70+
static constexpr const char *kGateway = "gateway";
71+
72+
/**
73+
* Direct connection.
74+
*/
75+
static constexpr const char *kDirect = "direct";
76+
77+
} // namespace AzureCosmosdbConnectionModeValues
78+
79+
namespace AzureCosmosdbConsistencyLevelValues
80+
{
81+
/**
82+
* none
83+
*/
84+
static constexpr const char *kStrong = "Strong";
85+
86+
/**
87+
* none
88+
*/
89+
static constexpr const char *kBoundedStaleness = "BoundedStaleness";
90+
91+
/**
92+
* none
93+
*/
94+
static constexpr const char *kSession = "Session";
95+
96+
/**
97+
* none
98+
*/
99+
static constexpr const char *kEventual = "Eventual";
100+
101+
/**
102+
* none
103+
*/
104+
static constexpr const char *kConsistentPrefix = "ConsistentPrefix";
105+
106+
} // namespace AzureCosmosdbConsistencyLevelValues
107+
108+
} // namespace azure
109+
} // namespace semconv
110+
OPENTELEMETRY_END_NAMESPACE
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/*
7+
* DO NOT EDIT, this is an Auto-generated file from:
8+
* buildscripts/semantic-convention/templates/registry/semantic_metrics-h.j2
9+
*/
10+
11+
#pragma once
12+
13+
#include "opentelemetry/common/macros.h"
14+
#include "opentelemetry/metrics/meter.h"
15+
#include "opentelemetry/version.h"
16+
17+
OPENTELEMETRY_BEGIN_NAMESPACE
18+
namespace semconv
19+
{
20+
namespace azure
21+
{
22+
23+
/**
24+
* Number of active client instances
25+
* <p>
26+
* updowncounter
27+
*/
28+
static constexpr const char *kMetricAzureCosmosdbClientActiveInstanceCount =
29+
"azure.cosmosdb.client.active_instance.count";
30+
static constexpr const char *descrMetricAzureCosmosdbClientActiveInstanceCount =
31+
"Number of active client instances";
32+
static constexpr const char *unitMetricAzureCosmosdbClientActiveInstanceCount = "{instance}";
33+
34+
static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
35+
CreateSyncInt64MetricAzureCosmosdbClientActiveInstanceCount(metrics::Meter *meter)
36+
{
37+
return meter->CreateInt64UpDownCounter(kMetricAzureCosmosdbClientActiveInstanceCount,
38+
descrMetricAzureCosmosdbClientActiveInstanceCount,
39+
unitMetricAzureCosmosdbClientActiveInstanceCount);
40+
}
41+
42+
static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
43+
CreateSyncDoubleMetricAzureCosmosdbClientActiveInstanceCount(metrics::Meter *meter)
44+
{
45+
return meter->CreateDoubleUpDownCounter(kMetricAzureCosmosdbClientActiveInstanceCount,
46+
descrMetricAzureCosmosdbClientActiveInstanceCount,
47+
unitMetricAzureCosmosdbClientActiveInstanceCount);
48+
}
49+
50+
static inline nostd::shared_ptr<metrics::ObservableInstrument>
51+
CreateAsyncInt64MetricAzureCosmosdbClientActiveInstanceCount(metrics::Meter *meter)
52+
{
53+
return meter->CreateInt64ObservableUpDownCounter(
54+
kMetricAzureCosmosdbClientActiveInstanceCount,
55+
descrMetricAzureCosmosdbClientActiveInstanceCount,
56+
unitMetricAzureCosmosdbClientActiveInstanceCount);
57+
}
58+
59+
static inline nostd::shared_ptr<metrics::ObservableInstrument>
60+
CreateAsyncDoubleMetricAzureCosmosdbClientActiveInstanceCount(metrics::Meter *meter)
61+
{
62+
return meter->CreateDoubleObservableUpDownCounter(
63+
kMetricAzureCosmosdbClientActiveInstanceCount,
64+
descrMetricAzureCosmosdbClientActiveInstanceCount,
65+
unitMetricAzureCosmosdbClientActiveInstanceCount);
66+
}
67+
68+
/**
69+
* <a href="https://learn.microsoft.com/azure/cosmos-db/request-units">Request units</a> consumed by
70+
* the operation <p> histogram
71+
*/
72+
static constexpr const char *kMetricAzureCosmosdbClientOperationRequestCharge =
73+
"azure.cosmosdb.client.operation.request_charge";
74+
static constexpr const char *descrMetricAzureCosmosdbClientOperationRequestCharge =
75+
"[Request units](https://learn.microsoft.com/azure/cosmos-db/request-units) consumed by the "
76+
"operation";
77+
static constexpr const char *unitMetricAzureCosmosdbClientOperationRequestCharge = "{request_unit}";
78+
79+
static inline nostd::unique_ptr<metrics::Histogram<uint64_t>>
80+
CreateSyncInt64MetricAzureCosmosdbClientOperationRequestCharge(metrics::Meter *meter)
81+
{
82+
return meter->CreateUInt64Histogram(kMetricAzureCosmosdbClientOperationRequestCharge,
83+
descrMetricAzureCosmosdbClientOperationRequestCharge,
84+
unitMetricAzureCosmosdbClientOperationRequestCharge);
85+
}
86+
87+
static inline nostd::unique_ptr<metrics::Histogram<double>>
88+
CreateSyncDoubleMetricAzureCosmosdbClientOperationRequestCharge(metrics::Meter *meter)
89+
{
90+
return meter->CreateDoubleHistogram(kMetricAzureCosmosdbClientOperationRequestCharge,
91+
descrMetricAzureCosmosdbClientOperationRequestCharge,
92+
unitMetricAzureCosmosdbClientOperationRequestCharge);
93+
}
94+
95+
} // namespace azure
96+
} // namespace semconv
97+
OPENTELEMETRY_END_NAMESPACE
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/*
7+
* DO NOT EDIT, this is an Auto-generated file from:
8+
* buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2
9+
*/
10+
11+
#pragma once
12+
13+
#include "opentelemetry/common/macros.h"
14+
#include "opentelemetry/version.h"
15+
16+
OPENTELEMETRY_BEGIN_NAMESPACE
17+
namespace semconv
18+
{
19+
namespace cassandra
20+
{
21+
22+
/**
23+
* The consistency level of the query. Based on consistency values from <a
24+
* href="https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html">CQL</a>.
25+
*/
26+
static constexpr const char *kCassandraConsistencyLevel = "cassandra.consistency.level";
27+
28+
/**
29+
* The data center of the coordinating node for a query.
30+
*/
31+
static constexpr const char *kCassandraCoordinatorDc = "cassandra.coordinator.dc";
32+
33+
/**
34+
* The ID of the coordinating node for a query.
35+
*/
36+
static constexpr const char *kCassandraCoordinatorId = "cassandra.coordinator.id";
37+
38+
/**
39+
* The fetch size used for paging, i.e. how many rows will be returned at once.
40+
*/
41+
static constexpr const char *kCassandraPageSize = "cassandra.page.size";
42+
43+
/**
44+
* Whether or not the query is idempotent.
45+
*/
46+
static constexpr const char *kCassandraQueryIdempotent = "cassandra.query.idempotent";
47+
48+
/**
49+
* The number of times a query was speculatively executed. Not set or @code 0 @endcode if the query
50+
* was not executed speculatively.
51+
*/
52+
static constexpr const char *kCassandraSpeculativeExecutionCount =
53+
"cassandra.speculative_execution.count";
54+
55+
namespace CassandraConsistencyLevelValues
56+
{
57+
/**
58+
* none
59+
*/
60+
static constexpr const char *kAll = "all";
61+
62+
/**
63+
* none
64+
*/
65+
static constexpr const char *kEachQuorum = "each_quorum";
66+
67+
/**
68+
* none
69+
*/
70+
static constexpr const char *kQuorum = "quorum";
71+
72+
/**
73+
* none
74+
*/
75+
static constexpr const char *kLocalQuorum = "local_quorum";
76+
77+
/**
78+
* none
79+
*/
80+
static constexpr const char *kOne = "one";
81+
82+
/**
83+
* none
84+
*/
85+
static constexpr const char *kTwo = "two";
86+
87+
/**
88+
* none
89+
*/
90+
static constexpr const char *kThree = "three";
91+
92+
/**
93+
* none
94+
*/
95+
static constexpr const char *kLocalOne = "local_one";
96+
97+
/**
98+
* none
99+
*/
100+
static constexpr const char *kAny = "any";
101+
102+
/**
103+
* none
104+
*/
105+
static constexpr const char *kSerial = "serial";
106+
107+
/**
108+
* none
109+
*/
110+
static constexpr const char *kLocalSerial = "local_serial";
111+
112+
} // namespace CassandraConsistencyLevelValues
113+
114+
} // namespace cassandra
115+
} // namespace semconv
116+
OPENTELEMETRY_END_NAMESPACE

0 commit comments

Comments
 (0)