diff --git a/script/semantic-conventions/README.md b/script/semantic-conventions/README.md index 55be92c61..6b091e396 100644 --- a/script/semantic-conventions/README.md +++ b/script/semantic-conventions/README.md @@ -35,6 +35,8 @@ Use this output as a basis for updating the relevant deprecations file and gener Note that some previously-removed semconv entries have been added back in recent versions, so may need to be removed from the deprecations partials. +NB should also check `TraceAttributeValues` and `ResourceAttributeValues`, since those can also change. + ## Add to SemConv/Version Add an entry to `src/SemConv/Version.php` for the new version. diff --git a/script/semantic-conventions/templates/AttributeValues.php.j2 b/script/semantic-conventions/templates/AttributeValues.php.j2 index c7a836fd7..4b102be82 100644 --- a/script/semantic-conventions/templates/AttributeValues.php.j2 +++ b/script/semantic-conventions/templates/AttributeValues.php.j2 @@ -36,5 +36,7 @@ interface {{ class }}AttributeValues {%- endif -%} {% if not loop.last %}{# blank line #}{% endif %} {%- endfor -%} +{# add our own deprecations for moved/removed values, so we don't break things #} +{% include class|lower + "_values_deprecations.php.partial" ignore missing without context %} } {# blank line #} diff --git a/script/semantic-conventions/templates/trace_values_deprecations.php.partial b/script/semantic-conventions/templates/trace_values_deprecations.php.partial new file mode 100644 index 000000000..4d2500093 --- /dev/null +++ b/script/semantic-conventions/templates/trace_values_deprecations.php.partial @@ -0,0 +1,24 @@ + /** + * @deprecated Use `messaging.operation.type.publish` + */ + public const MESSAGING_OPERATION_PUBLISH = 'publish'; + + /** + * @deprecated Use `messaging.operation.type.create` + */ + public const MESSAGING_OPERATION_CREATE = 'create'; + + /** + * @deprecated Use `messaging.operation.type.receive` + */ + public const MESSAGING_OPERATION_RECEIVE = 'receive'; + + /** + * @deprecated Use `messaging.operation.type.deliver` + */ + public const MESSAGING_OPERATION_DELIVER = 'process'; + + /** + * @deprecated Use `messaging.operation.type.settle` + */ + public const MESSAGING_OPERATION_SETTLE = 'settle'; diff --git a/src/SemConv/ResourceAttributeValues.php b/src/SemConv/ResourceAttributeValues.php index 6be5fbb90..11880b165 100644 --- a/src/SemConv/ResourceAttributeValues.php +++ b/src/SemConv/ResourceAttributeValues.php @@ -487,4 +487,5 @@ interface ResourceAttributeValues * @see ResourceAttributes::TELEMETRY_SDK_LANGUAGE */ public const TELEMETRY_SDK_LANGUAGE_WEBJS = 'webjs'; + } diff --git a/src/SemConv/TraceAttributeValues.php b/src/SemConv/TraceAttributeValues.php index 65151d3ad..d832a0338 100644 --- a/src/SemConv/TraceAttributeValues.php +++ b/src/SemConv/TraceAttributeValues.php @@ -3144,4 +3144,29 @@ interface TraceAttributeValues * @see TraceAttributes::VCS_REPOSITORY_REF_TYPE */ public const VCS_REPOSITORY_REF_TYPE_TAG = 'tag'; + + /** + * @deprecated Use `messaging.operation.type.publish` + */ + public const MESSAGING_OPERATION_PUBLISH = 'publish'; + + /** + * @deprecated Use `messaging.operation.type.create` + */ + public const MESSAGING_OPERATION_CREATE = 'create'; + + /** + * @deprecated Use `messaging.operation.type.receive` + */ + public const MESSAGING_OPERATION_RECEIVE = 'receive'; + + /** + * @deprecated Use `messaging.operation.type.deliver` + */ + public const MESSAGING_OPERATION_DELIVER = 'process'; + + /** + * @deprecated Use `messaging.operation.type.settle` + */ + public const MESSAGING_OPERATION_SETTLE = 'settle'; }