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

feat(SDK-2101): add setrequestmetadata public method #944

Merged
merged 4 commits into from
Dec 11, 2023

Conversation

JagadeeshKaricherla-branch
Copy link
Contributor

@JagadeeshKaricherla-branch JagadeeshKaricherla-branch commented Oct 5, 2023

Add setrequestmetadata public method

Pull Request Template

Description

exposes a new public method setRequestMetadata which sets specific key/value pairs to be sent to all API requests. This is required for integrating with partners like Adobe Analytics, Amplitude, etc.
setRequestMetadata(String key, String value)

example usage :
branch.setRequestMetaData("key1","value1");

live view on dashboard with the metadata
image

Fixes # (issue) : SDK-2101

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Unit test
  • Integration test

JS Budget Check

Please mention the size in kb before abd after this PR

Files Before After
dist/build.js.
dist/build.min.js

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Mentions:

List the person or team responsible for reviewing proposed changes.

cc @BranchMetrics/saas-sdk-devs for visibility.

Add setrequestmetadata public method
@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2023

Test Results

118 tests   111 ✔️  49s ⏱️
    1 suites      7 💤
    1 files        0

Results for commit 86a521f.

♻️ This comment has been updated with latest results.

remove test for exceptions to generate mocha test report
@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (master@d39e439). Click here to learn what that means.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #944   +/-   ##
=========================================
  Coverage          ?   26.49%           
=========================================
  Files             ?       15           
  Lines             ?     2340           
  Branches          ?        0           
=========================================
  Hits              ?      620           
  Misses            ?     1720           
  Partials          ?        0           

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

@JagadeeshKaricherla-branch JagadeeshKaricherla-branch marked this pull request as draft October 5, 2023 17:55
change log info to error when setRequestmetadata fails
fix issue with metadata value not stringified
@JagadeeshKaricherla-branch JagadeeshKaricherla-branch marked this pull request as ready for review December 8, 2023 09:09
@JagadeeshKaricherla-branch JagadeeshKaricherla-branch merged commit 9766c74 into master Dec 11, 2023
13 checks passed
@JagadeeshKaricherla-branch JagadeeshKaricherla-branch deleted the feature/setrequestmetadata branch December 11, 2023 21:11
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