Skip to content

Adding feature to metrics#685

Merged
rakshil14-2 merged 15 commits into
mainfrom
metrics_support
Jul 16, 2026
Merged

Adding feature to metrics#685
rakshil14-2 merged 15 commits into
mainfrom
metrics_support

Conversation

@rakshil14-2

@rakshil14-2 rakshil14-2 commented May 20, 2026

Copy link
Copy Markdown
Contributor

Description of changes:

  • Breaking API Change: Removing enable_metrics_collection.
  • Added AWS_IoT_Metrics support for SDK layer
  • Passing iot-device-sdk version to sdk metrics.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@rakshil14-2
rakshil14-2 marked this pull request as ready for review May 20, 2026 21:47
Comment thread awsiot/iot_metrics.py Outdated
Comment thread awsiot/iot_metrics.py Outdated
Comment thread awsiot/mqtt5_client_builder.py Outdated
Comment thread awsiot/_iot_metrics.py Outdated

from awscrt.aws_iot_metrics import AWSIoTMetrics, IoTMetricsMetadata

_SDK_LIBRARY_NAME = "IoTDeviceSDK/Python"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It seems unnecessary to have _SDK_LIBRARY_NAME as it is the same default value in AWSIoTMetrics.


**cipher_pref** (:class:`awscrt.io.TlsCipherPref`): Cipher preference to use for TLS connection. Default is `TlsCipherPref.DEFAULT`.

**enable_metrics_collection** (`bool`): Whether to send the SDK version number in the CONNECT packet.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The API has been introduced for several years. We don't plan to break the API so far.


**cipher_pref** (:class:`awscrt.io.TlsCipherPref`): Cipher preference to use for TLS connection. Default is `TlsCipherPref.DEFAULT`.

**enable_metrics_collection** (`bool`): Whether to send the SDK version number in the CONNECT packet.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The API has been introduced for several years. We don't plan to break the API so far.

Comment thread test/test_get_metrics.py Outdated

class TestBuildSdkMetrics(unittest.TestCase):

def test_library_name(self):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we keep the test, just verify the default library name was setup properly.

@xiazhvera xiazhvera left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fix&ship

@rakshil14-2
rakshil14-2 merged commit d90b3ae into main Jul 16, 2026
11 checks passed
@rakshil14-2
rakshil14-2 deleted the metrics_support branch July 16, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants