Skip to content

Add IoT Metrics Support#809

Open
xiazhvera wants to merge 32 commits intomainfrom
iot_metrics
Open

Add IoT Metrics Support#809
xiazhvera wants to merge 32 commits intomainfrom
iot_metrics

Conversation

@xiazhvera
Copy link
Contributor

@xiazhvera xiazhvera commented Dec 19, 2025

Issue #, if available:

Description of changes:

  • Bind IoTDeviceSDKMetrics and metrics related features , CRT is now appending AWS metrics by default.
  • Add enableMetrics option to allow user disable metrics.

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

Comment on lines +673 to 676
/** Enable AWS IoT Metrics Collection. This is always set to true for now. */
bool m_enableMetricsCollection;

Crt::String m_sdkName = "CPPv2";
Crt::String m_sdkVersion = AWS_CRT_CPP_VERSION;
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we remove this? I think struct IoTDeviceSDKMetrics handles the metrics now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Long story short: Let's keep it as-is for now.

And for more context: Unfortunately, IoT SDK CPP exposes APIs to set sdkName/sdkVersion, so users could technically be relying on the APIs to update the SDK name.And let's not breaking them for now.

CRT currently doesn't expose any API to modify metrics. The only way to do so today is by manually setting the username field. Let's preserve that behavior for now to prevent users from modifying metrics directly. We'll expose a proper metrics API once the metadata work is complete with struct IoTDeviceSDKMetrics

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