Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate semconv 1.24.0 #1219

Merged
merged 3 commits into from
Jan 23, 2024
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
38 changes: 37 additions & 1 deletion script/semantic-conventions/semconv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
# Supported semantic conventions:
# - Trace
# - Resource
#
# Source repositories:
# - https://github.com/open-telemetry/semantic-conventions/releases
# - https://github.com/open-telemetry/build-tools/releases

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ROOT_DIR="${SCRIPT_DIR}/../../"
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=${SEMCONV_VERSION:=1.23.1}
SEMCONV_VERSION=${SEMCONV_VERSION:=1.24.0}
SPEC_VERSION=v$SEMCONV_VERSION
SCHEMA_URL=https://opentelemetry.io/schemas/$SEMCONV_VERSION
GENERATOR_VERSION=0.23.0
Expand Down Expand Up @@ -65,4 +69,36 @@ docker run --rm \
-Dclass="Resource" \
-DschemaUrl=$SCHEMA_URL

# Trace attribute values
docker run --rm \
-v "${SPEC_DIR}/model:/source" \
-v "${SCRIPT_DIR}/templates:/templates" \
-v "${CODE_DIR}:/output" \
-u "${UID}" \
otel/semconvgen:$GENERATOR_VERSION \
--only span,event,attribute_group,scope \
--yaml-root /source \
code \
--template /templates/AttributeValues.php.j2 \
--output "/output/TraceAttributeValues.php" \
-Dnamespace="OpenTelemetry\\SemConv" \
-Dclass="Trace" \
-DschemaUrl=$SCHEMA_URL

# Resource attribute values
docker run --rm \
-v "${SPEC_DIR}/model:/source" \
-v "${SCRIPT_DIR}/templates:/templates" \
-v "${CODE_DIR}:/output" \
-u "${UID}" \
otel/semconvgen:$GENERATOR_VERSION \
--only resource \
--yaml-root /source \
code \
--template /templates/AttributeValues.php.j2 \
--output "/output/ResourceAttributeValues.php" \
-Dnamespace="OpenTelemetry\\SemConv" \
-Dclass="Resource" \
-DschemaUrl=$SCHEMA_URL

rm -rf "${SPEC_DIR}" || true
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@
*/
public const HTTP_SERVER_NAME = 'http.server_name';

/**
* @deprecated
*/
public const HTTP_USER_AGENT = 'http.user_agent';

/**
* @deprecated
*/
Expand Down Expand Up @@ -93,11 +88,6 @@
*/
public const HTTP_CLIENT_IP = 'http.client_ip';

/**
* @deprecated
*/
public const HTTP_FLAVOR = 'http.flavor';

/**
* @deprecated
*/
Expand Down Expand Up @@ -207,3 +197,18 @@
* @deprecated
*/
public const THREAD_DAEMON = 'thread.daemon';

/**
* @deprecated
*/
public const EVENT_DOMAIN = 'event.domain';

/**
* @deprecated
*/
public const SYSTEM_DISK_DIRECTION = 'system.disk.direction';

/**
* @deprecated
*/
public const SYSTEM_NETWORK_DIRECTION = 'system.network.direction';
Loading
Loading