Skip to content

Commit

Permalink
Semconv 1.30 (#1495)
Browse files Browse the repository at this point in the history
* generate semconv 1.30
NB that v1.29 contained a bug, and the recommendation was to skip this version

* reduce minimum php version to 8.0
we still have a bunch of auto-instrumentations that work with 8.0
  • Loading branch information
brettmc authored Feb 6, 2025
1 parent 5d24db8 commit 66c8ce8
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 8 deletions.
2 changes: 1 addition & 1 deletion script/semantic-conventions/semconv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SPEC_DIR="${ROOT_DIR}/var/semantic-conventions"
CODE_DIR="${ROOT_DIR}/src/SemConv"

# freeze the spec & generator tools versions to make SemanticAttributes generation reproducible
SEMCONV_VERSION=1.28.0
SEMCONV_VERSION=1.30.0
SPEC_VERSION=v$SEMCONV_VERSION
SCHEMA_URL=https://opentelemetry.io/schemas/$SEMCONV_VERSION
OTEL_WEAVER_IMG_VERSION=v0.12.0
Expand Down
2 changes: 1 addition & 1 deletion src/SemConv/ResourceAttributeValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface ResourceAttributeValues
/**
* The URL of the OpenTelemetry schema for these values.
*/
public const SCHEMA_URL = 'https://opentelemetry.io/schemas/1.28.0';
public const SCHEMA_URL = 'https://opentelemetry.io/schemas/1.30.0';

/**
* ec2
Expand Down
32 changes: 31 additions & 1 deletion src/SemConv/ResourceAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface ResourceAttributes
/**
* The URL of the OpenTelemetry schema for these keys and values.
*/
public const SCHEMA_URL = 'https://opentelemetry.io/schemas/1.28.0';
public const SCHEMA_URL = 'https://opentelemetry.io/schemas/1.30.0';

/**
* Uniquely identifies the framework API revision offered by a version (`os.version`) of the android operating system. More information can be found [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels).
Expand Down Expand Up @@ -638,6 +638,16 @@ interface ResourceAttributes
*/
public const K8S_DEPLOYMENT_UID = 'k8s.deployment.uid';

/**
* The name of the horizontal pod autoscaler.
*/
public const K8S_HPA_NAME = 'k8s.hpa.name';

/**
* The UID of the horizontal pod autoscaler.
*/
public const K8S_HPA_UID = 'k8s.hpa.uid';

/**
* The name of the Job.
*/
Expand Down Expand Up @@ -693,6 +703,26 @@ interface ResourceAttributes
*/
public const K8S_REPLICASET_UID = 'k8s.replicaset.uid';

/**
* The name of the replication controller.
*/
public const K8S_REPLICATIONCONTROLLER_NAME = 'k8s.replicationcontroller.name';

/**
* The UID of the replication controller.
*/
public const K8S_REPLICATIONCONTROLLER_UID = 'k8s.replicationcontroller.uid';

/**
* The name of the resource quota.
*/
public const K8S_RESOURCEQUOTA_NAME = 'k8s.resourcequota.name';

/**
* The UID of the resource quota.
*/
public const K8S_RESOURCEQUOTA_UID = 'k8s.resourcequota.uid';

/**
* The name of the StatefulSet.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/SemConv/TraceAttributeValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface TraceAttributeValues
/**
* The URL of the OpenTelemetry schema for these values.
*/
public const SCHEMA_URL = 'https://opentelemetry.io/schemas/1.28.0';
public const SCHEMA_URL = 'https://opentelemetry.io/schemas/1.30.0';
/**
* Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time.
*
Expand Down
36 changes: 33 additions & 3 deletions src/SemConv/TraceAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface TraceAttributes
/**
* The URL of the OpenTelemetry schema for these keys and values.
*/
public const SCHEMA_URL = 'https://opentelemetry.io/schemas/1.28.0';
public const SCHEMA_URL = 'https://opentelemetry.io/schemas/1.30.0';

/**
* Uniquely identifies the framework API revision offered by a version (`os.version`) of the android operating system. More information can be found [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels).
Expand Down Expand Up @@ -1044,14 +1044,14 @@ interface TraceAttributes
* Low cardinality representation of a database query text.
*
* `db.query.summary` provides static summary of the query text. It describes a class of database queries and is useful as a grouping key, especially when analyzing telemetry for database calls involving complex queries.
* 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 [Generating query summary](../../docs/database/database-spans.md#generating-a-summary-of-the-query-text) section.
* 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 [Generating query summary](../database/database-spans.md#generating-a-summary-of-the-query-text) section.
*/
public const DB_QUERY_SUMMARY = 'db.query.summary';

/**
* The database query being executed.
*
* For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext).
* For sanitization see [Sanitization of `db.query.text`](../database/database-spans.md#sanitization-of-dbquerytext).
* 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 `; ` or some other database system specific separator if more applicable.
* 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 values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk.
*/
Expand Down Expand Up @@ -2188,6 +2188,16 @@ interface TraceAttributes
*/
public const K8S_DEPLOYMENT_UID = 'k8s.deployment.uid';

/**
* The name of the horizontal pod autoscaler.
*/
public const K8S_HPA_NAME = 'k8s.hpa.name';

/**
* The UID of the horizontal pod autoscaler.
*/
public const K8S_HPA_UID = 'k8s.hpa.uid';

/**
* The name of the Job.
*/
Expand Down Expand Up @@ -2258,6 +2268,26 @@ interface TraceAttributes
*/
public const K8S_REPLICASET_UID = 'k8s.replicaset.uid';

/**
* The name of the replication controller.
*/
public const K8S_REPLICATIONCONTROLLER_NAME = 'k8s.replicationcontroller.name';

/**
* The UID of the replication controller.
*/
public const K8S_REPLICATIONCONTROLLER_UID = 'k8s.replicationcontroller.uid';

/**
* The name of the resource quota.
*/
public const K8S_RESOURCEQUOTA_NAME = 'k8s.resourcequota.name';

/**
* The UID of the resource quota.
*/
public const K8S_RESOURCEQUOTA_UID = 'k8s.resourcequota.uid';

/**
* The name of the StatefulSet.
*/
Expand Down
1 change: 1 addition & 0 deletions src/SemConv/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

enum Version: string
{
case VERSION_1_30_0 = '1.30.0';
case VERSION_1_28_0 = '1.28.0';
case VERSION_1_27_0 = '1.27.0';
case VERSION_1_26_0 = '1.26.0';
Expand Down
2 changes: 1 addition & 1 deletion src/SemConv/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
],
"require": {
"php": "^8.1"
"php": "^8.0"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 66c8ce8

Please sign in to comment.