Skip to content

Add IoT Metrics Support#680

Merged
xiazhvera merged 46 commits into
mainfrom
iot_metrics
Apr 21, 2026
Merged

Add IoT Metrics Support#680
xiazhvera merged 46 commits into
mainfrom
iot_metrics

Conversation

@xiazhvera
Copy link
Copy Markdown
Contributor

@xiazhvera xiazhvera commented Jan 7, 2026

Issue #, if available:

Description of changes:

  • Bind IoTDeviceSDKMetrics and metrics related features , CRT is now appending AWS metrics by default.

  • Creating a shared base interface for MqttConnectionConfig and Mqtt5ClientOption

  • Node: Add disableMetrics option to allow user disable metrics.

    • MQTT3: Add node-only disable_metrics option in MqttConnectionConfig
    • MQTT5: Add node-only disableMetrics option in Mqtt5ClientOption
  • Browser:

    • renamed SDK metrics: "SDK=NodeJSv2" => "SDK=IoTDeviceSDK/JS"

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

Comment thread lib/common/aws_iot_shared.ts Outdated
Comment thread lib/common/mqtt_shared.ts Outdated
Comment thread lib/native/mqtt.spec.ts
})
});

test_env.conditional_test(test_env.AWS_IOT_ENV.mqtt311_is_valid_direct_auth_mqtt())('MQTT311 Connection - basic auth with metrics', async () => {
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.

Can we do this against IoT Core; as it stands this will only get run in codebuild

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The test cannot run against IoT Core, as IoT Core will rule out the metrics string. The test actually uses the connection failure to verify that the metrics are appended.

Comment thread lib/native/mqtt5.spec.ts Outdated
Comment thread source/mqtt5_client.c Outdated
Comment thread source/mqtt_client_connection.c
Comment thread source/mqtt_client_connection.c
Comment thread source/mqtt_client_connection.c Outdated
@xiazhvera
Copy link
Copy Markdown
Contributor Author

TODO: as we have a mock server in place with the nodejs change, we will modify the test to use the mock server so we can actually capture the package and verify that the metrics are appended propelry.

Comment thread lib/native/mqtt.ts Outdated
Comment thread lib/native/mqtt5.ts
Comment thread source/mqtt_client_connection.c
@xiazhvera xiazhvera merged commit a6f5288 into main Apr 21, 2026
65 of 66 checks passed
@xiazhvera xiazhvera deleted the iot_metrics branch April 21, 2026 17:25
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