Skip to content

Commit 5426ace

Browse files
authored
Merge branch 'main' into proto_std_should_follow_pb
2 parents a25f92e + 25c923a commit 5426ace

27 files changed

+1035
-176
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ Increment the:
2727
* [CONFIGURATION] File configuration - implement log_level
2828
[#3810](https://github.com/open-telemetry/opentelemetry-cpp/pull/3810)
2929

30+
* [SEMANTIC CONVENTIONS] Upgrade to semantic conventions 1.39.0
31+
[#3813](https://github.com/open-telemetry/opentelemetry-cpp/pull/3813)
32+
3033
Breaking changes:
3134

3235
* [CONFIGURATION] File configuration - remove zipkin

api/include/opentelemetry/semconv/db_attributes.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,18 @@ static constexpr const char *kDbOperationName = "db.operation.name";
8484
Summary may be available to the instrumentation through
8585
instrumentation hooks or other means. If it is not available, instrumentations
8686
that support query parsing SHOULD generate a summary following
87-
<a href="/docs/database/database-spans.md#generating-a-summary-of-the-query">Generating query
87+
<a href="/docs/db/database-spans.md#generating-a-summary-of-the-query">Generating query
8888
summary</a> section.
8989
*/
9090
static constexpr const char *kDbQuerySummary = "db.query.summary";
9191

9292
/**
9393
The database query being executed.
9494
<p>
95-
For sanitization see <a
96-
href="/docs/database/database-spans.md#sanitization-of-dbquerytext">Sanitization of @code
97-
db.query.text @endcode</a>. For batch operations, if the individual operations are known to have
98-
the same query text then that query text SHOULD be used, otherwise all of the individual query
99-
texts SHOULD be concatenated with separator @code ; @endcode or some other database system
95+
For sanitization see <a href="/docs/db/database-spans.md#sanitization-of-dbquerytext">Sanitization
96+
of @code db.query.text @endcode</a>. For batch operations, if the individual operations are known
97+
to have the same query text then that query text SHOULD be used, otherwise all of the individual
98+
query texts SHOULD be concatenated with separator @code ; @endcode or some other database system
10099
specific separator if more applicable. Parameterized query text SHOULD NOT be sanitized. Even
101100
though parameterized query text can potentially have sensitive data, by using a parameterized
102101
query the user is giving a strong signal that any sensitive data will be passed as parameter

api/include/opentelemetry/semconv/error_attributes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace error
3535
additional filters are applied.
3636
<p>
3737
If the operation has completed successfully, instrumentations SHOULD NOT set @code error.type
38-
@endcode. <p> If a specific domain defines its own set of error identifiers (such as HTTP or gRPC
38+
@endcode. <p> If a specific domain defines its own set of error identifiers (such as HTTP or RPC
3939
status codes), it's RECOMMENDED to: <ul> <li>Use a domain-specific attribute</li> <li>Set @code
4040
error.type @endcode to capture all errors, regardless of whether they are defined within the
4141
domain-specific set or not.</li>

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

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ static constexpr const char *kCloudResourceId = "cloud.resource_id";
8686

8787
namespace CloudPlatformValues
8888
{
89+
/**
90+
Akamai Cloud Compute
91+
*/
92+
static constexpr const char *kAkamaiCloudCompute = "akamai_cloud.compute";
93+
8994
/**
9095
Alibaba Cloud Elastic Compute Service
9196
*/
@@ -171,6 +176,11 @@ static constexpr const char *kAzureAppService = "azure.app_service";
171176
*/
172177
static constexpr const char *kAzureOpenshift = "azure.openshift";
173178

179+
/**
180+
Google Vertex AI Agent Engine
181+
*/
182+
static constexpr const char *kGcpAgentEngine = "gcp.agent_engine";
183+
174184
/**
175185
Google Bare Metal Solution (BMS)
176186
*/
@@ -206,6 +216,11 @@ static constexpr const char *kGcpAppEngine = "gcp_app_engine";
206216
*/
207217
static constexpr const char *kGcpOpenshift = "gcp_openshift";
208218

219+
/**
220+
Server on Hetzner Cloud
221+
*/
222+
static constexpr const char *kHetznerCloudServer = "hetzner.cloud_server";
223+
209224
/**
210225
Red Hat OpenShift on IBM Cloud
211226
*/
@@ -236,10 +251,20 @@ static constexpr const char *kTencentCloudEks = "tencent_cloud_eks";
236251
*/
237252
static constexpr const char *kTencentCloudScf = "tencent_cloud_scf";
238253

254+
/**
255+
Vultr Cloud Compute
256+
*/
257+
static constexpr const char *kVultrCloudCompute = "vultr.cloud_compute";
258+
239259
} // namespace CloudPlatformValues
240260

241261
namespace CloudProviderValues
242262
{
263+
/**
264+
Akamai Cloud
265+
*/
266+
static constexpr const char *kAkamaiCloud = "akamai_cloud";
267+
243268
/**
244269
Alibaba Cloud
245270
*/
@@ -265,6 +290,11 @@ static constexpr const char *kGcp = "gcp";
265290
*/
266291
static constexpr const char *kHeroku = "heroku";
267292

293+
/**
294+
Hetzner
295+
*/
296+
static constexpr const char *kHetzner = "hetzner";
297+
268298
/**
269299
IBM Cloud
270300
*/
@@ -280,6 +310,11 @@ static constexpr const char *kOracleCloud = "oracle_cloud";
280310
*/
281311
static constexpr const char *kTencentCloud = "tencent_cloud";
282312

313+
/**
314+
Vultr
315+
*/
316+
static constexpr const char *kVultr = "vultr";
317+
283318
} // namespace CloudProviderValues
284319

285320
} // namespace cloud

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static constexpr const char *kContainerId = "container.id";
7373
<p>
7474
Docker defines a sha256 of the image id; @code container.image.id @endcode corresponds to the
7575
@code Image @endcode field from the Docker container inspect <a
76-
href="https://docs.docker.com/reference/api/engine/version/v1.43/#tag/Container/operation/ContainerInspect">API</a>
76+
href="https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerInspect">API</a>
7777
endpoint. K8s defines a link to the container registry repository with digest @code "imageID":
7878
"registry.azurecr.io
7979
/namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"
@@ -92,7 +92,7 @@ static constexpr const char *kContainerImageName = "container.image.name";
9292
Repo digests of the container image as provided by the container runtime.
9393
<p>
9494
<a
95-
href="https://docs.docker.com/reference/api/engine/version/v1.43/#tag/Image/operation/ImageInspect">Docker</a>
95+
href="https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect">Docker</a>
9696
and <a
9797
href="https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238">CRI</a>
9898
report those under the @code RepoDigests @endcode field.
@@ -101,7 +101,7 @@ static constexpr const char *kContainerImageRepoDigests = "container.image.repo_
101101

102102
/**
103103
Container image tags. An example can be found in <a
104-
href="https://docs.docker.com/reference/api/engine/version/v1.43/#tag/Image/operation/ImageInspect">Docker
104+
href="https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect">Docker
105105
Image Inspect</a>. Should be only the @code <tag> @endcode section of the full name for example
106106
from @code registry.example.com/my-org/my-image:<tag> @endcode.
107107
*/

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -416,19 +416,18 @@ static constexpr const char *kDbQueryParameter = "db.query.parameter";
416416
Summary may be available to the instrumentation through
417417
instrumentation hooks or other means. If it is not available, instrumentations
418418
that support query parsing SHOULD generate a summary following
419-
<a href="/docs/database/database-spans.md#generating-a-summary-of-the-query">Generating query
419+
<a href="/docs/db/database-spans.md#generating-a-summary-of-the-query">Generating query
420420
summary</a> section.
421421
*/
422422
static constexpr const char *kDbQuerySummary = "db.query.summary";
423423

424424
/**
425425
The database query being executed.
426426
<p>
427-
For sanitization see <a
428-
href="/docs/database/database-spans.md#sanitization-of-dbquerytext">Sanitization of @code
429-
db.query.text @endcode</a>. For batch operations, if the individual operations are known to have
430-
the same query text then that query text SHOULD be used, otherwise all of the individual query
431-
texts SHOULD be concatenated with separator @code ; @endcode or some other database system
427+
For sanitization see <a href="/docs/db/database-spans.md#sanitization-of-dbquerytext">Sanitization
428+
of @code db.query.text @endcode</a>. For batch operations, if the individual operations are known
429+
to have the same query text then that query text SHOULD be used, otherwise all of the individual
430+
query texts SHOULD be concatenated with separator @code ; @endcode or some other database system
432431
specific separator if more applicable. Parameterized query text SHOULD NOT be sanitized. Even
433432
though parameterized query text can potentially have sensitive data, by using a parameterized
434433
query the user is giving a strong signal that any sensitive data will be passed as parameter

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static constexpr const char *kErrorMessage = "error.message";
4747
additional filters are applied.
4848
<p>
4949
If the operation has completed successfully, instrumentations SHOULD NOT set @code error.type
50-
@endcode. <p> If a specific domain defines its own set of error identifiers (such as HTTP or gRPC
50+
@endcode. <p> If a specific domain defines its own set of error identifiers (such as HTTP or RPC
5151
status codes), it's RECOMMENDED to: <ul> <li>Use a domain-specific attribute</li> <li>Set @code
5252
error.type @endcode to capture all errors, regardless of whether they are defined within the
5353
domain-specific set or not.</li>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ static constexpr const char *kGenAiOutputType = "gen_ai.output.type";
211211
*/
212212
OPENTELEMETRY_DEPRECATED static constexpr const char *kGenAiPrompt = "gen_ai.prompt";
213213

214+
/**
215+
The name of the prompt that uniquely identifies it.
216+
*/
217+
static constexpr const char *kGenAiPromptName = "gen_ai.prompt.name";
218+
214219
/**
215220
The Generative AI provider as identified by the client or server instrumentation.
216221
<p>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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 jsonrpc
20+
{
21+
22+
/**
23+
Protocol version, as specified in the @code jsonrpc @endcode property of the request and its
24+
corresponding response.
25+
*/
26+
static constexpr const char *kJsonrpcProtocolVersion = "jsonrpc.protocol.version";
27+
28+
/**
29+
A string representation of the @code id @endcode property of the request and its corresponding
30+
response. <p> Under the <a href="https://www.jsonrpc.org/specification">JSON-RPC
31+
specification</a>, the @code id @endcode property may be a string, number, null, or omitted
32+
entirely. When omitted, the request is treated as a notification. Using @code null @endcode is not
33+
equivalent to omitting the @code id @endcode, but it is discouraged. Instrumentations SHOULD NOT
34+
capture this attribute when the @code id @endcode is @code null @endcode or omitted.
35+
*/
36+
static constexpr const char *kJsonrpcRequestId = "jsonrpc.request.id";
37+
38+
} // namespace jsonrpc
39+
} // namespace semconv
40+
OPENTELEMETRY_END_NAMESPACE

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,29 @@ static constexpr const char *kK8sNodeUid = "k8s.node.uid";
365365
*/
366366
static constexpr const char *kK8sPodAnnotation = "k8s.pod.annotation";
367367

368+
/**
369+
Specifies the hostname of the Pod.
370+
<p>
371+
The K8s Pod spec has an optional hostname field, which can be used to specify a hostname.
372+
Refer to <a
373+
href="https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-hostname-and-subdomain-field">K8s
374+
docs</a> for more information about this field. <p> This attribute aligns with the @code hostname
375+
@endcode field of the <a
376+
href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podspec-v1-core">K8s
377+
PodSpec</a>.
378+
*/
379+
static constexpr const char *kK8sPodHostname = "k8s.pod.hostname";
380+
381+
/**
382+
IP address allocated to the Pod.
383+
<p>
384+
This attribute aligns with the @code podIP @endcode field of the
385+
<a
386+
href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podstatus-v1-core">K8s
387+
PodStatus</a>.
388+
*/
389+
static constexpr const char *kK8sPodIp = "k8s.pod.ip";
390+
368391
/**
369392
The label placed on the Pod, the @code <key> @endcode being the label name, the value being the
370393
label value. <p> Examples: <ul> <li>A label @code app @endcode with value @code my-app @endcode
@@ -391,6 +414,19 @@ OPENTELEMETRY_DEPRECATED static constexpr const char *kK8sPodLabels = "k8s.pod.l
391414
*/
392415
static constexpr const char *kK8sPodName = "k8s.pod.name";
393416

417+
/**
418+
The start timestamp of the Pod.
419+
<p>
420+
Date and time at which the object was acknowledged by the Kubelet.
421+
This is before the Kubelet pulled the container image(s) for the pod.
422+
<p>
423+
This attribute aligns with the @code startTime @endcode field of the
424+
<a
425+
href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podstatus-v1-core">K8s
426+
PodStatus</a>, in ISO 8601 (RFC 3339 compatible) format.
427+
*/
428+
static constexpr const char *kK8sPodStartTime = "k8s.pod.start_time";
429+
394430
/**
395431
The phase for the pod. Corresponds to the @code phase @endcode field of the: <a
396432
href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core">K8s

0 commit comments

Comments
 (0)