Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudwatch integration demo #2013

Open
wants to merge 65 commits into
base: develop-pre-1.11.0
Choose a base branch
from
Open

Conversation

disa6302
Copy link
Contributor

@disa6302 disa6302 commented Jun 14, 2024

Issue #, if available:

What was changed?

  • Added a new demo that shows integration with cloudwatch metrics and logs, pushing RTP metrics and some end to end stats with mock frames, along with demonstrating some metrics with storage. The SDK depends on AWS SDK CPP and builds the monitoring and logs component if run with -DENABLE_AWS_SDK_INTEG=ON. The demo project uses a config file based mechanism to set the different options in our C SDK. The demo uses the same underlying common.c and other common wrappers that our samples use today

  • Rearranged Common.c into different files to add more clarity to the basic building blocks of the existing samples

  • Created a new MetricsHandling object that handles RTP stats calculation. ICE stats are still out of this and treated separately to avoid potential breaking in customer application.

Why was it changed?

  • Setting up this demo would help in testing out our core samples library with different run time and calculate performance metrics
  • It also helps customers get a head start if they are interested in integration with cloudwatch.

How was it changed?

  • Included a new cloudwatch-integ folder that has the heart of the logic
  • Included a new cmake arg to build this only if the arg is set
  • Created config files for different job configurations. Default is set and new ones can also be created for new configs in the future. Config files are cleaner since it lays out the available knobs clearly to run the demo. Config file paths can be passed via -DCW_CONFIG_HEADER option
  • Added MetricsHandling (StatsCtx) object that handles RTP stats
  • Cleaned up Common.c to be split into multiple source files to clearly define purpose. No code changed here - only rearranging.
  • Included new options in pSampleConfiguration that was required for this demo and will also be useful for existing samples
  • Added a new API setUpCredentialProvider to set up IoT/long term credential provider. This is a mandatory requirement if using the samples provided with the next release - this change was made since this set up was masked behind a #ifdef block which would require sample modification, this is not conducive for the demo specifically if these decisions are taken based on a config file or even environment variable.

What testing was done for the changes?

  • Running the demo in a CI set up to confirm metrics and logs are emitted to cloudwatch
  • Tested the existing samples to confirm it is not broken.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-commenter
Copy link

codecov-commenter commented Jun 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.67%. Comparing base (3824226) to head (d2c91e9).

Current head d2c91e9 differs from pull request most recent head 8cf886b

Please upload reports for the commit 8cf886b to get more accurate results.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2013      +/-   ##
===========================================
- Coverage    88.68%   88.67%   -0.01%     
===========================================
  Files           48       48              
  Lines        12726    12726              
===========================================
- Hits         11286    11285       -1     
- Misses        1440     1441       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@disa6302 disa6302 marked this pull request as ready for review June 17, 2024 02:22
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.

3 participants