From 42a8b955012c0073f70a4b1a7857dd1774bb3f81 Mon Sep 17 00:00:00 2001 From: Brett McBride Date: Fri, 20 Oct 2023 07:10:44 +1100 Subject: [PATCH] adding 1.19->1.22 semconv traceattributes deprecations (#1129) --- script/semantic-conventions/README.md | 9 +- .../templates/trace_deprecations.php.partial | 112 +++++++++++++++++- src/SemConv/TraceAttributes.php | 110 +++++++++++++++++ 3 files changed, 229 insertions(+), 2 deletions(-) diff --git a/script/semantic-conventions/README.md b/script/semantic-conventions/README.md index ff230d8cd..2166b3833 100644 --- a/script/semantic-conventions/README.md +++ b/script/semantic-conventions/README.md @@ -14,7 +14,7 @@ If attributes have been removed in an update, you can add them back in via `temp the contents will be included in the generated output. Please remember to mark them as deprecated to discourage their future use. -After generating new sementic conventions, you can locate removed attributes via: +After generating new semantic conventions, you can locate removed attributes via: ```shell diff <(grep "public const" src/SemConv/ResourceAttributes.php | sort -u) \ @@ -23,4 +23,11 @@ diff <(grep "public const" src/SemConv/ResourceAttributes.php | sort -u) \ | grep -v SCHEMA_URL ``` +```shell +diff <(grep "public const" src/SemConv/TraceAttributes.php | sort -u) \ + <(git show main:src/SemConv/TraceAttributes.php | grep "public const" | sort -u) \ + | grep '^>' \ + | grep -v SCHEMA_URL +``` + Use this output as a basis for updating the relevant deprecations file and generate a second time to include them in the final output. diff --git a/script/semantic-conventions/templates/trace_deprecations.php.partial b/script/semantic-conventions/templates/trace_deprecations.php.partial index f350f1673..18c515fcd 100644 --- a/script/semantic-conventions/templates/trace_deprecations.php.partial +++ b/script/semantic-conventions/templates/trace_deprecations.php.partial @@ -86,4 +86,114 @@ /** * @deprecated */ - public const NET_PEER_IP = 'net.peer.ip'; \ No newline at end of file + public const NET_PEER_IP = 'net.peer.ip'; + + /** + * @deprecated + */ + public const HTTP_CLIENT_IP = 'http.client_ip'; + + /** + * @deprecated + */ + public const HTTP_FLAVOR = 'http.flavor'; + + /** + * @deprecated + */ + public const MESSAGING_CONSUMER_ID = 'messaging.consumer.id'; + + /** + * @deprecated + */ + public const MESSAGING_DESTINATION_KIND = 'messaging.destination.kind'; + + /** + * @deprecated + */ + public const MESSAGING_KAFKA_CLIENT_ID = 'messaging.kafka.client_id'; + + /** + * @deprecated + */ + public const MESSAGING_KAFKA_SOURCE_PARTITION = 'messaging.kafka.source.partition'; + + /** + * @deprecated + */ + public const MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = 'messaging.message.payload_compressed_size_bytes'; + + /** + * @deprecated + */ + public const MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = 'messaging.message.payload_size_bytes'; + + /** + * @deprecated + */ + public const MESSAGING_ROCKETMQ_CLIENT_ID = 'messaging.rocketmq.client_id'; + + /** + * @deprecated + */ + public const MESSAGING_SOURCE_ANONYMOUS = 'messaging.source.anonymous'; + + /** + * @deprecated + */ + public const MESSAGING_SOURCE_KIND = 'messaging.source.kind'; + + /** + * @deprecated + */ + public const MESSAGING_SOURCE_NAME = 'messaging.source.name'; + + /** + * @deprecated + */ + public const MESSAGING_SOURCE_TEMPLATE = 'messaging.source.template'; + + /** + * @deprecated + */ + public const MESSAGING_SOURCE_TEMPORARY = 'messaging.source.temporary'; + + /** + * @deprecated + */ + public const NET_APP_PROTOCOL_NAME = 'net.app.protocol.name'; + + /** + * @deprecated + */ + public const NET_APP_PROTOCOL_VERSION = 'net.app.protocol.version'; + + /** + * @deprecated + */ + public const NET_HOST_CARRIER_ICC = 'net.host.carrier.icc'; + + /** + * @deprecated + */ + public const NET_HOST_CARRIER_MCC = 'net.host.carrier.mcc'; + + /** + * @deprecated + */ + public const NET_HOST_CARRIER_MNC = 'net.host.carrier.mnc'; + + /** + * @deprecated + */ + public const NET_HOST_CARRIER_NAME = 'net.host.carrier.name'; + + /** + * @deprecated + */ + public const NET_HOST_CONNECTION_SUBTYPE = 'net.host.connection.subtype'; + + /** + * @deprecated + */ + public const NET_HOST_CONNECTION_TYPE = 'net.host.connection.type'; \ No newline at end of file diff --git a/src/SemConv/TraceAttributes.php b/src/SemConv/TraceAttributes.php index 31090826f..4329db5f9 100644 --- a/src/SemConv/TraceAttributes.php +++ b/src/SemConv/TraceAttributes.php @@ -1939,4 +1939,114 @@ interface TraceAttributes * @deprecated */ public const NET_PEER_IP = 'net.peer.ip'; + + /** + * @deprecated + */ + public const HTTP_CLIENT_IP = 'http.client_ip'; + + /** + * @deprecated + */ + public const HTTP_FLAVOR = 'http.flavor'; + + /** + * @deprecated + */ + public const MESSAGING_CONSUMER_ID = 'messaging.consumer.id'; + + /** + * @deprecated + */ + public const MESSAGING_DESTINATION_KIND = 'messaging.destination.kind'; + + /** + * @deprecated + */ + public const MESSAGING_KAFKA_CLIENT_ID = 'messaging.kafka.client_id'; + + /** + * @deprecated + */ + public const MESSAGING_KAFKA_SOURCE_PARTITION = 'messaging.kafka.source.partition'; + + /** + * @deprecated + */ + public const MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = 'messaging.message.payload_compressed_size_bytes'; + + /** + * @deprecated + */ + public const MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = 'messaging.message.payload_size_bytes'; + + /** + * @deprecated + */ + public const MESSAGING_ROCKETMQ_CLIENT_ID = 'messaging.rocketmq.client_id'; + + /** + * @deprecated + */ + public const MESSAGING_SOURCE_ANONYMOUS = 'messaging.source.anonymous'; + + /** + * @deprecated + */ + public const MESSAGING_SOURCE_KIND = 'messaging.source.kind'; + + /** + * @deprecated + */ + public const MESSAGING_SOURCE_NAME = 'messaging.source.name'; + + /** + * @deprecated + */ + public const MESSAGING_SOURCE_TEMPLATE = 'messaging.source.template'; + + /** + * @deprecated + */ + public const MESSAGING_SOURCE_TEMPORARY = 'messaging.source.temporary'; + + /** + * @deprecated + */ + public const NET_APP_PROTOCOL_NAME = 'net.app.protocol.name'; + + /** + * @deprecated + */ + public const NET_APP_PROTOCOL_VERSION = 'net.app.protocol.version'; + + /** + * @deprecated + */ + public const NET_HOST_CARRIER_ICC = 'net.host.carrier.icc'; + + /** + * @deprecated + */ + public const NET_HOST_CARRIER_MCC = 'net.host.carrier.mcc'; + + /** + * @deprecated + */ + public const NET_HOST_CARRIER_MNC = 'net.host.carrier.mnc'; + + /** + * @deprecated + */ + public const NET_HOST_CARRIER_NAME = 'net.host.carrier.name'; + + /** + * @deprecated + */ + public const NET_HOST_CONNECTION_SUBTYPE = 'net.host.connection.subtype'; + + /** + * @deprecated + */ + public const NET_HOST_CONNECTION_TYPE = 'net.host.connection.type'; }