Skip to content

Commit

Permalink
adding 1.19->1.22 semconv traceattributes deprecations (#1129)
Browse files Browse the repository at this point in the history
  • Loading branch information
brettmc authored Oct 19, 2023
1 parent a325a8f commit 42a8b95
Show file tree
Hide file tree
Showing 3 changed files with 229 additions and 2 deletions.
9 changes: 8 additions & 1 deletion script/semantic-conventions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand All @@ -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.
112 changes: 111 additions & 1 deletion script/semantic-conventions/templates/trace_deprecations.php.partial
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,114 @@
/**
* @deprecated
*/
public const NET_PEER_IP = 'net.peer.ip';
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';
110 changes: 110 additions & 0 deletions src/SemConv/TraceAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

0 comments on commit 42a8b95

Please sign in to comment.