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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ Increment the:
* [CONFIGURATION] File configuration - implement log_level
[#3810](https://github.com/open-telemetry/opentelemetry-cpp/pull/3810)

* [SEMANTIC CONVENTIONS] Upgrade to semantic conventions 1.39.0
[#3813](https://github.com/open-telemetry/opentelemetry-cpp/pull/3813)

Breaking changes:

* [CONFIGURATION] File configuration - remove zipkin
Expand Down
11 changes: 5 additions & 6 deletions api/include/opentelemetry/semconv/db_attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,18 @@ static constexpr const char *kDbOperationName = "db.operation.name";
Summary may be available to the instrumentation through
instrumentation hooks or other means. If it is not available, instrumentations
that support query parsing SHOULD generate a summary following
<a href="/docs/database/database-spans.md#generating-a-summary-of-the-query">Generating query
<a href="/docs/db/database-spans.md#generating-a-summary-of-the-query">Generating query
summary</a> section.
*/
static constexpr const char *kDbQuerySummary = "db.query.summary";

/**
The database query being executed.
<p>
For sanitization see <a
href="/docs/database/database-spans.md#sanitization-of-dbquerytext">Sanitization of @code
db.query.text @endcode</a>. For batch operations, if the individual operations are known to have
the same query text then that query text SHOULD be used, otherwise all of the individual query
texts SHOULD be concatenated with separator @code ; @endcode or some other database system
For sanitization see <a href="/docs/db/database-spans.md#sanitization-of-dbquerytext">Sanitization
of @code db.query.text @endcode</a>. For batch operations, if the individual operations are known
to have the same query text then that query text SHOULD be used, otherwise all of the individual
query texts SHOULD be concatenated with separator @code ; @endcode or some other database system
specific separator if more applicable. Parameterized query text SHOULD NOT be sanitized. Even
though parameterized query text can potentially have sensitive data, by using a parameterized
query the user is giving a strong signal that any sensitive data will be passed as parameter
Expand Down
2 changes: 1 addition & 1 deletion api/include/opentelemetry/semconv/error_attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace error
additional filters are applied.
<p>
If the operation has completed successfully, instrumentations SHOULD NOT set @code error.type
@endcode. <p> If a specific domain defines its own set of error identifiers (such as HTTP or gRPC
@endcode. <p> If a specific domain defines its own set of error identifiers (such as HTTP or RPC
status codes), it's RECOMMENDED to: <ul> <li>Use a domain-specific attribute</li> <li>Set @code
error.type @endcode to capture all errors, regardless of whether they are defined within the
domain-specific set or not.</li>
Expand Down
35 changes: 35 additions & 0 deletions api/include/opentelemetry/semconv/incubating/cloud_attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ static constexpr const char *kCloudResourceId = "cloud.resource_id";

namespace CloudPlatformValues
{
/**
Akamai Cloud Compute
*/
static constexpr const char *kAkamaiCloudCompute = "akamai_cloud.compute";

/**
Alibaba Cloud Elastic Compute Service
*/
Expand Down Expand Up @@ -171,6 +176,11 @@ static constexpr const char *kAzureAppService = "azure.app_service";
*/
static constexpr const char *kAzureOpenshift = "azure.openshift";

/**
Google Vertex AI Agent Engine
*/
static constexpr const char *kGcpAgentEngine = "gcp.agent_engine";

/**
Google Bare Metal Solution (BMS)
*/
Expand Down Expand Up @@ -206,6 +216,11 @@ static constexpr const char *kGcpAppEngine = "gcp_app_engine";
*/
static constexpr const char *kGcpOpenshift = "gcp_openshift";

/**
Server on Hetzner Cloud
*/
static constexpr const char *kHetznerCloudServer = "hetzner.cloud_server";

/**
Red Hat OpenShift on IBM Cloud
*/
Expand Down Expand Up @@ -236,10 +251,20 @@ static constexpr const char *kTencentCloudEks = "tencent_cloud_eks";
*/
static constexpr const char *kTencentCloudScf = "tencent_cloud_scf";

/**
Vultr Cloud Compute
*/
static constexpr const char *kVultrCloudCompute = "vultr.cloud_compute";

} // namespace CloudPlatformValues

namespace CloudProviderValues
{
/**
Akamai Cloud
*/
static constexpr const char *kAkamaiCloud = "akamai_cloud";

/**
Alibaba Cloud
*/
Expand All @@ -265,6 +290,11 @@ static constexpr const char *kGcp = "gcp";
*/
static constexpr const char *kHeroku = "heroku";

/**
Hetzner
*/
static constexpr const char *kHetzner = "hetzner";

/**
IBM Cloud
*/
Expand All @@ -280,6 +310,11 @@ static constexpr const char *kOracleCloud = "oracle_cloud";
*/
static constexpr const char *kTencentCloud = "tencent_cloud";

/**
Vultr
*/
static constexpr const char *kVultr = "vultr";

} // namespace CloudProviderValues

} // namespace cloud
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static constexpr const char *kContainerId = "container.id";
<p>
Docker defines a sha256 of the image id; @code container.image.id @endcode corresponds to the
@code Image @endcode field from the Docker container inspect <a
href="https://docs.docker.com/reference/api/engine/version/v1.43/#tag/Container/operation/ContainerInspect">API</a>
href="https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerInspect">API</a>
endpoint. K8s defines a link to the container registry repository with digest @code "imageID":
"registry.azurecr.io
/namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"
Expand All @@ -92,7 +92,7 @@ static constexpr const char *kContainerImageName = "container.image.name";
Repo digests of the container image as provided by the container runtime.
<p>
<a
href="https://docs.docker.com/reference/api/engine/version/v1.43/#tag/Image/operation/ImageInspect">Docker</a>
href="https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect">Docker</a>
and <a
href="https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238">CRI</a>
report those under the @code RepoDigests @endcode field.
Expand All @@ -101,7 +101,7 @@ static constexpr const char *kContainerImageRepoDigests = "container.image.repo_

/**
Container image tags. An example can be found in <a
href="https://docs.docker.com/reference/api/engine/version/v1.43/#tag/Image/operation/ImageInspect">Docker
href="https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect">Docker
Image Inspect</a>. Should be only the @code <tag> @endcode section of the full name for example
from @code registry.example.com/my-org/my-image:<tag> @endcode.
*/
Expand Down
11 changes: 5 additions & 6 deletions api/include/opentelemetry/semconv/incubating/db_attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,19 +416,18 @@ static constexpr const char *kDbQueryParameter = "db.query.parameter";
Summary may be available to the instrumentation through
instrumentation hooks or other means. If it is not available, instrumentations
that support query parsing SHOULD generate a summary following
<a href="/docs/database/database-spans.md#generating-a-summary-of-the-query">Generating query
<a href="/docs/db/database-spans.md#generating-a-summary-of-the-query">Generating query
summary</a> section.
*/
static constexpr const char *kDbQuerySummary = "db.query.summary";

/**
The database query being executed.
<p>
For sanitization see <a
href="/docs/database/database-spans.md#sanitization-of-dbquerytext">Sanitization of @code
db.query.text @endcode</a>. For batch operations, if the individual operations are known to have
the same query text then that query text SHOULD be used, otherwise all of the individual query
texts SHOULD be concatenated with separator @code ; @endcode or some other database system
For sanitization see <a href="/docs/db/database-spans.md#sanitization-of-dbquerytext">Sanitization
of @code db.query.text @endcode</a>. For batch operations, if the individual operations are known
to have the same query text then that query text SHOULD be used, otherwise all of the individual
query texts SHOULD be concatenated with separator @code ; @endcode or some other database system
specific separator if more applicable. Parameterized query text SHOULD NOT be sanitized. Even
though parameterized query text can potentially have sensitive data, by using a parameterized
query the user is giving a strong signal that any sensitive data will be passed as parameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static constexpr const char *kErrorMessage = "error.message";
additional filters are applied.
<p>
If the operation has completed successfully, instrumentations SHOULD NOT set @code error.type
@endcode. <p> If a specific domain defines its own set of error identifiers (such as HTTP or gRPC
@endcode. <p> If a specific domain defines its own set of error identifiers (such as HTTP or RPC
status codes), it's RECOMMENDED to: <ul> <li>Use a domain-specific attribute</li> <li>Set @code
error.type @endcode to capture all errors, regardless of whether they are defined within the
domain-specific set or not.</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ static constexpr const char *kGenAiOutputType = "gen_ai.output.type";
*/
OPENTELEMETRY_DEPRECATED static constexpr const char *kGenAiPrompt = "gen_ai.prompt";

/**
The name of the prompt that uniquely identifies it.
*/
static constexpr const char *kGenAiPromptName = "gen_ai.prompt.name";

/**
The Generative AI provider as identified by the client or server instrumentation.
<p>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* 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 jsonrpc
{

/**
Protocol version, as specified in the @code jsonrpc @endcode property of the request and its
corresponding response.
*/
static constexpr const char *kJsonrpcProtocolVersion = "jsonrpc.protocol.version";

/**
A string representation of the @code id @endcode property of the request and its corresponding
response. <p> Under the <a href="https://www.jsonrpc.org/specification">JSON-RPC
specification</a>, the @code id @endcode property may be a string, number, null, or omitted
entirely. When omitted, the request is treated as a notification. Using @code null @endcode is not
equivalent to omitting the @code id @endcode, but it is discouraged. Instrumentations SHOULD NOT
capture this attribute when the @code id @endcode is @code null @endcode or omitted.
*/
static constexpr const char *kJsonrpcRequestId = "jsonrpc.request.id";

} // namespace jsonrpc
} // namespace semconv
OPENTELEMETRY_END_NAMESPACE
36 changes: 36 additions & 0 deletions api/include/opentelemetry/semconv/incubating/k8s_attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,29 @@ static constexpr const char *kK8sNodeUid = "k8s.node.uid";
*/
static constexpr const char *kK8sPodAnnotation = "k8s.pod.annotation";

/**
Specifies the hostname of the Pod.
<p>
The K8s Pod spec has an optional hostname field, which can be used to specify a hostname.
Refer to <a
href="https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-hostname-and-subdomain-field">K8s
docs</a> for more information about this field. <p> This attribute aligns with the @code hostname
@endcode field of the <a
href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podspec-v1-core">K8s
PodSpec</a>.
*/
static constexpr const char *kK8sPodHostname = "k8s.pod.hostname";

/**
IP address allocated to the Pod.
<p>
This attribute aligns with the @code podIP @endcode field of the
<a
href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podstatus-v1-core">K8s
PodStatus</a>.
*/
static constexpr const char *kK8sPodIp = "k8s.pod.ip";

/**
The label placed on the Pod, the @code <key> @endcode being the label name, the value being the
label value. <p> Examples: <ul> <li>A label @code app @endcode with value @code my-app @endcode
Expand All @@ -391,6 +414,19 @@ OPENTELEMETRY_DEPRECATED static constexpr const char *kK8sPodLabels = "k8s.pod.l
*/
static constexpr const char *kK8sPodName = "k8s.pod.name";

/**
The start timestamp of the Pod.
<p>
Date and time at which the object was acknowledged by the Kubelet.
This is before the Kubelet pulled the container image(s) for the pod.
<p>
This attribute aligns with the @code startTime @endcode field of the
<a
href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podstatus-v1-core">K8s
PodStatus</a>, in ISO 8601 (RFC 3339 compatible) format.
*/
static constexpr const char *kK8sPodStartTime = "k8s.pod.start_time";

/**
The phase for the pod. Corresponds to the @code phase @endcode field of the: <a
href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core">K8s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ namespace linux

/**
The Linux Slab memory state

@deprecated
{"note": "Replaced by @code system.memory.linux.slab.state @endcode.", "reason": "renamed",
"renamed_to": "system.memory.linux.slab.state"}
*/
static constexpr const char *kLinuxMemorySlabState = "linux.memory.slab.state";
OPENTELEMETRY_DEPRECATED static constexpr const char *kLinuxMemorySlabState =
"linux.memory.slab.state";

namespace LinuxMemorySlabStateValues
{
Expand Down
Loading
Loading