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

chore: update semantic convention version v1.27.0 #2000

Merged
merged 6 commits into from
Aug 8, 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
5 changes: 5 additions & 0 deletions opentelemetry-semantic-conventions/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## vNext

### Changed

- Update to [v1.27.0](https://github.com/open-telemetry/semantic-conventions/releases/tag/v1.27.0) of the semantic conventions.
[#2000](https://github.com/open-telemetry/opentelemetry-rust/pull/2000)

## v0.16.0
### Changed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
CRATE_DIR="${SCRIPT_DIR}/../"

# freeze the spec version and generator version to make generation reproducible
SPEC_VERSION=1.26.0
SEMCOVGEN_VERSION=0.24.0
SPEC_VERSION=1.27.0
SEMCOVGEN_VERSION=0.25.0

cd "$CRATE_DIR"

Expand Down Expand Up @@ -35,7 +35,7 @@ docker run --rm \
-v "${CRATE_DIR}/scripts/templates:/templates" \
-v "${CRATE_DIR}/src:/output" \
otel/semconvgen:$SEMCOVGEN_VERSION \
--only span,event,scope \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scope type is removed from latest build-tool, and is unused - open-telemetry/build-tools#309

--only span,event \
-f /source code \
--template /templates/semantic_attributes.rs.j2 \
--output /output/trace.rs \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
{%- set attribute = (attrs | selectattr('deprecated', 'none') | first) %}
{%- set attribute = attribute if attribute else (attrs | first) %}
{%- if conventions != 'attribute' %}
{%- if not attribute.deprecated %}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conditional check to ensure that the deprecated constants only defined with #[deprecated] annotation, and not exported.

pub use crate::attribute::{{ attribute.fqn_const_name }};
{%- endif %}
{%- else %}
/// {% filter escape %}{{attribute.brief | to_doc_brief}}.{% endfilter %}
{%- if attribute.note %}
Expand All @@ -31,7 +33,7 @@ pub use crate::attribute::{{ attribute.fqn_const_name }};
/// - `{{example}}`
{%- endfor %}
{%- endif %}
{%- if (attribute.deprecated) %}
{%- if attribute.deprecated %}
#[deprecated]
{%- endif %}
pub const {{ attribute.fqn_const_name }}: &str = "{{attribute.fqn}}";
Expand Down
535 changes: 487 additions & 48 deletions opentelemetry-semantic-conventions/src/attribute.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion opentelemetry-semantic-conventions/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ pub mod trace;

/// The schema URL that matches the version of the semantic conventions that
/// this crate defines.
pub const SCHEMA_URL: &str = "https://opentelemetry.io/schemas/1.26.0";
pub const SCHEMA_URL: &str = "https://opentelemetry.io/schemas/1.27.0";
560 changes: 522 additions & 38 deletions opentelemetry-semantic-conventions/src/metric.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion opentelemetry-semantic-conventions/src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub use crate::attribute::CONTAINER_IMAGE_REPO_DIGESTS;
pub use crate::attribute::CONTAINER_IMAGE_TAGS;
pub use crate::attribute::CONTAINER_NAME;
pub use crate::attribute::CONTAINER_RUNTIME;
pub use crate::attribute::DEPLOYMENT_ENVIRONMENT;
pub use crate::attribute::DEPLOYMENT_ENVIRONMENT_NAME;
pub use crate::attribute::DEVICE_ID;
pub use crate::attribute::DEVICE_MANUFACTURER;
pub use crate::attribute::DEVICE_MODEL_IDENTIFIER;
Expand Down
17 changes: 11 additions & 6 deletions opentelemetry-semantic-conventions/src/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ pub use crate::attribute::AWS_S3_DELETE;
pub use crate::attribute::AWS_S3_KEY;
pub use crate::attribute::AWS_S3_PART_NUMBER;
pub use crate::attribute::AWS_S3_UPLOAD_ID;
pub use crate::attribute::AZ_SERVICE_REQUEST_ID;
pub use crate::attribute::CLIENT_ADDRESS;
pub use crate::attribute::CLIENT_PORT;
pub use crate::attribute::CLOUDEVENTS_EVENT_ID;
Expand Down Expand Up @@ -85,16 +86,13 @@ pub use crate::attribute::DB_COSMOSDB_REQUEST_CHARGE;
pub use crate::attribute::DB_COSMOSDB_REQUEST_CONTENT_LENGTH;
pub use crate::attribute::DB_COSMOSDB_STATUS_CODE;
pub use crate::attribute::DB_COSMOSDB_SUB_STATUS_CODE;
pub use crate::attribute::DB_ELASTICSEARCH_CLUSTER_NAME;
pub use crate::attribute::DB_ELASTICSEARCH_NODE_NAME;
pub use crate::attribute::DB_NAMESPACE;
pub use crate::attribute::DB_OPERATION_NAME;
pub use crate::attribute::DB_QUERY_TEXT;
pub use crate::attribute::DB_SYSTEM;
pub use crate::attribute::ENDUSER_ID;
pub use crate::attribute::ENDUSER_ROLE;
pub use crate::attribute::ENDUSER_SCOPE;
pub use crate::attribute::ERROR_TYPE;
pub use crate::attribute::EVENT_NAME;
pub use crate::attribute::EXCEPTION_ESCAPED;
pub use crate::attribute::EXCEPTION_MESSAGE;
pub use crate::attribute::EXCEPTION_STACKTRACE;
Expand All @@ -115,17 +113,22 @@ pub use crate::attribute::FEATURE_FLAG_KEY;
pub use crate::attribute::FEATURE_FLAG_PROVIDER_NAME;
pub use crate::attribute::FEATURE_FLAG_VARIANT;
pub use crate::attribute::GEN_AI_COMPLETION;
pub use crate::attribute::GEN_AI_OPERATION_NAME;
pub use crate::attribute::GEN_AI_PROMPT;
pub use crate::attribute::GEN_AI_REQUEST_FREQUENCY_PENALTY;
pub use crate::attribute::GEN_AI_REQUEST_MAX_TOKENS;
pub use crate::attribute::GEN_AI_REQUEST_MODEL;
pub use crate::attribute::GEN_AI_REQUEST_PRESENCE_PENALTY;
pub use crate::attribute::GEN_AI_REQUEST_STOP_SEQUENCES;
pub use crate::attribute::GEN_AI_REQUEST_TEMPERATURE;
pub use crate::attribute::GEN_AI_REQUEST_TOP_K;
pub use crate::attribute::GEN_AI_REQUEST_TOP_P;
pub use crate::attribute::GEN_AI_RESPONSE_FINISH_REASONS;
pub use crate::attribute::GEN_AI_RESPONSE_ID;
pub use crate::attribute::GEN_AI_RESPONSE_MODEL;
pub use crate::attribute::GEN_AI_SYSTEM;
pub use crate::attribute::GEN_AI_USAGE_COMPLETION_TOKENS;
pub use crate::attribute::GEN_AI_USAGE_PROMPT_TOKENS;
pub use crate::attribute::GEN_AI_USAGE_INPUT_TOKENS;
pub use crate::attribute::GEN_AI_USAGE_OUTPUT_TOKENS;
pub use crate::attribute::GRAPHQL_DOCUMENT;
pub use crate::attribute::GRAPHQL_OPERATION_NAME;
pub use crate::attribute::GRAPHQL_OPERATION_TYPE;
Expand All @@ -136,9 +139,11 @@ pub use crate::attribute::HTTP_RESPONSE_STATUS_CODE;
pub use crate::attribute::HTTP_ROUTE;
pub use crate::attribute::MESSAGING_BATCH_MESSAGE_COUNT;
pub use crate::attribute::MESSAGING_CLIENT_ID;
pub use crate::attribute::MESSAGING_CONSUMER_GROUP_NAME;
pub use crate::attribute::MESSAGING_DESTINATION_ANONYMOUS;
pub use crate::attribute::MESSAGING_DESTINATION_NAME;
pub use crate::attribute::MESSAGING_DESTINATION_PARTITION_ID;
pub use crate::attribute::MESSAGING_DESTINATION_SUBSCRIPTION_NAME;
pub use crate::attribute::MESSAGING_DESTINATION_TEMPLATE;
pub use crate::attribute::MESSAGING_DESTINATION_TEMPORARY;
pub use crate::attribute::MESSAGING_MESSAGE_BODY_SIZE;
Expand Down
Loading