8000 [SEMANTIC CONVENTIONS] Upgrade to semantic conventions 1.30.0 by marcalff · Pull Request #3258 · open-telemetry/opentelemetry-cpp · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions api/include/opentelemetry/semconv/exception_attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,13 @@ namespace exception
{

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

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ static constexpr const char *kArtifactAttestationFilename = "artifact.attestatio

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

Expand Down
DDB1
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ static constexpr const char *kAwsEcsTaskRevision = "aws.ecs.task.revision";
*/
static constexpr const char *kAwsEksClusterArn = "aws.eks.cluster.arn";

/**
* The AWS extended request ID as returned in the response header @code x-amz-id-2 @endcode.
*/
static constexpr const char *kAwsExtendedRequestId = "aws.extended_request_id";

/**
* The full invoked ARN as provided on the @code Context @endcode passed to the function (@code
* Lambda-Runtime-Invoked-Function-Arn @endcode header on the @code /runtime/invocation/next
Expand Down Expand Up @@ -227,8 +232,8 @@ static constexpr const char *kAwsLogStreamArns = "aws.log.stream.arns";
static constexpr const char *kAwsLogStreamNames = "aws.log.stream.names";

/**
* The AWS request ID as returned in the response headers @code x-amz-request-id @endcode or @code
* x-amz-requestid @endcode.
* The AWS request ID as returned in the response headers @code x-amzn-requestid @endcode, @code
* x-amzn-request-id @endcode or @code x-amz-request-id @endcode.
*/
static constexpr const char *kAwsRequestId = "aws.request_id";

Expand Down
110 changes: 110 additions & 0 deletions api/include/opentelemetry/semconv/incubating/azure_attributes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

/*
* DO NOT EDIT, this is an Auto-generated file from:
* buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2
*/

#pragma once

#include "opentelemetry/common/macros.h"
#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace semconv
{
namespace azure
{

/**
* The unique identifier of the client instance.
*/
static constexpr const char *kAzureClientId = "azure.client.id";

/**
* Cosmos client connection mode.
*/
static constexpr const char *kAzureCosmosdbConnectionMode = "azure.cosmosdb.connection.mode";

/**
* Account or request <a
* href="https://learn.microsoft.com/azure/cosmos-db/consistency-levels">consistency level</a>.
*/
static constexpr const char *kAzureCosmosdbConsistencyLevel = "azure.cosmosdb.consistency.level";

/**
* 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. <p> Region name matches the format of @code displayName @endcode in <a
* href="https://learn.microsoft.com/rest/api/subscription/subscriptions/list-locations?view=rest-subscription-2021-10-01&tabs=HTTP#location">Azure
* Location API</a>
*/
static constexpr const char *kAzureCosmosdbOperationContactedRegions =
"azure.cosmosdb.operation.contacted_regions";

/**
* The number of request units consumed by the operation.
*/
static constexpr const char *kAzureCosmosdbOperationRequestCharge =
"azure.cosmosdb.operation.request_charge";

/**
* Request payload size in bytes.
*/
static constexpr const char *kAzureCosmosdbRequestBodySize = "azure.cosmosdb.request.body.size";

/**
* Cosmos DB sub status code.
*/
static constexpr const char *kAzureCosmosdbResponseSubStatusCode =
"azure.cosmosdb.response.sub_status_code";

namespace AzureCosmosdbConnectionModeValues
{
/**
* Gateway (HTTP) connection.
*/
static constexpr const char *kGateway = "gateway";

/**
* Direct connection.
*/
static constexpr const char *kDirect = "direct";

} // namespace AzureCosmosdbConnectionModeValues

namespace AzureCosmosdbConsistencyLevelValues
{
/**
* none
*/
static constexpr const char *kStrong = "Strong";

/**
* none
*/
static constexpr const char *kBoundedStaleness = "BoundedStaleness";

/**
* none
*/
static constexpr const char *kSession = "Session";

/**
* none
*/
static constexpr const char *kEventual = "Eventual";

/**
* none
*/
static constexpr const char *kConsistentPrefix = "ConsistentPrefix";

} // namespace AzureCosmosdbConsistencyLevelValues

} // namespace azure
} // namespace semconv
OPENTELEMETRY_END_NAMESPACE
97 changes: 97 additions & 0 deletions api/include/opentelemetry/semconv/incubating/azure_metrics.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

/*
* DO NOT EDIT, this is an Auto-generated file from:
* buildscripts/semantic-convention/templates/registry/semantic_metrics-h.j2
*/

#pragma once

#include "opentelemetry/common/macros.h"
#include "opentelemetry/metrics/meter.h"
#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace semconv
{
namespace azure
{

/**
* Number of active client instances
* <p>
* updowncounter
*/
static constexpr const char *kMetricAzureCosmosdbClientActiveInstanceCount =
"azure.cosmosdb.client.active_instance.count";
static constexpr const char *descrMetricAzureCosmosdbClientActiveInstanceCount =
"Number of active client instances";
static constexpr const char *unitMetricAzureCosmosdbClientActiveInstanceCount = "{instance}";

static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
CreateSyncInt64MetricAzureCosmosdbClientActiveInstanceCount(metrics::Meter *meter)
{
return meter->CreateInt64UpDownCounter(kMetricAzureCosmosdbClientActiveInstanceCount,
descrMetricAzureCosmosdbClientActiveInstanceCount,
unitMetricAzureCosmosdbClientActiveInstanceCount);
}

static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
CreateSyncDoubleMetricAzureCosmosdbClientActiveInstanceCount(me 2E17 trics::Meter *meter)
{
return meter->CreateDoubleUpDownCounter(kMetricAzureCosmosdbClientActiveInstanceCount,
descrMetricAzureCosmosdbClientActiveInstanceCount,
unitMetricAzureCosmosdbClientActiveInstanceCount);
}

static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricAzureCosmosdbClientActiveInstanceCount(metrics::Meter *meter)
{
return meter->CreateInt64ObservableUpDownCounter(
kMetricAzureCosmosdbClientActiveInstanceCount,
descrMetricAzureCosmosdbClientActiveInstanceCount,
unitMetricAzureCosmosdbClientActiveInstanceCount);
}

static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricAzureCosmosdbClientActiveInstanceCount(metrics::Meter *meter)
{
return meter->CreateDoubleObservableUpDownCounter(
kMetricAzureCosmosdbClientActiveInstanceCount,
descrMetricAzureCosmosdbClientActiveInstanceCount,
unitMetricAzureCosmosdbClientActiveInstanceCount);
}

/**
* <a href="https://learn.microsoft.com/azure/cosmos-db/request-units">Request units</a> consumed by
* the operation <p> histogram
*/
static constexpr const char *kMetricAzureCosmosdbClientOperationRequestCharge =
"azure.cosmosdb.client.operation.request_charge";
static constexpr const char *descrMetricAzureCosmosdbClientOperationRequestCharge =
"[Request units](https://learn.microsoft.com/azure/cosmos-db/request-units) consumed by the "
"operation";
static constexpr const char *unitMetricAzureCosmosdbClientOperationRequestCharge = "{request_unit}";

static inline nostd::unique_ptr<metrics::Histogram<uint64_t>>
CreateSyncInt64MetricAzureCosmosdbClientOperationRequestCharge(metrics::Meter *meter)
{
return meter->CreateUInt64Histogram(kMetricAzureCosmosdbClientOperationRequestCharge,
descrMetricAzureCosmosdbClientOperationRequestCharge,
unitMetricAzureCosmosdbClientOperationRequestCharge);
}

static inline nostd::unique_ptr<metrics::Histogram<double>>
CreateSyncDoubleMetricAzureCosmosdbClientOperationRequestCharge(metrics::Meter *meter)
{
return meter->CreateDoubleHistogram(kMetricAzureCosmosdbClientOperationRequestCharge,
descrMetricAzureCosmosdbClientOperationRequestCharge,
unitMetricAzureCosmosdbClientOperationRequestCharge);
}

} // namespace azure
} // namespace semconv
OPENTELEMETRY_END_NAMESPACE
116 changes: 116 additions & 0 deletions api/include/opentelemetry/semconv/incubating/cassandra_attributes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

/*
* DO NOT EDIT, this is an Auto-generated file from:
* buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2
*/

#pragma once

#include "opentelemetry/common/macros.h"
#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace semconv
{
namespace cassandra
{

/**
* The consistency level of the query. Based on consistency values from <a
* href="https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html">CQL</a>.
*/
static constexpr const char *kCassandraConsistencyLevel = "cassandra.consistency.level";

/**
* The data center of the coordinating node for a query.
*/
static constexpr const char *kCassandraCoordinatorDc = "cassandra.coordinator.dc";

/**
* The ID of the coordinating node for a query.
*/
static constexpr const char *kCassandraCoordinatorId = "cassandra.coordinator.id";

/**
* The fetch size used for paging, i.e. how many rows will be returned at once.
*/
static constexpr const char *kCassandraPageSize = "cassandra.page.size";

/**
* Whether or not the query is idempotent.
*/
static constexpr const char *kCassandraQueryIdempotent = "cassandra.query.idempotent";

/**
* The number of times a query was speculatively executed. Not set or @code 0 @endcode if the query
* was not executed speculatively.
*/
static constexpr const char *kCassandraSpeculativeExecutionCount =
"cassandra.speculative_execution.count";

namespace CassandraConsistencyLevelValues
{
/**
* none
*/
static constexpr const char *kAll = "all";

/**
* none
*/
static constexpr const char *kEachQuorum = "each_quorum";

/**
* none
*/
static constexpr const char *kQuorum = "quorum";

/**
* none
*/
static constexpr const char *kLocalQuorum = "local_quorum";

/**
* none
*/
static constexpr const char *kOne = "one";

/**
* none
*/
static constexpr const char *kTwo = "two";

/**
* none
*/
static constexpr const char *kThree = "three";

/**
* none
*/
static constexpr const char *kLocalOne = "local_one";

/**
* none
*/
static constexpr const char *kAny = "any";

/**
* none
*/
static constexpr const char *kSerial = "serial";

/**
* none
*/
static constexpr const char *kLocalSerial = "local_serial";

} // namespace CassandraConsistencyLevelValues

} // namespace cassandra
} // namespace semconv
OPENTELEMETRY_END_NAMESPACE
Loading
Loading
0