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

Convert undefined custom properties to empty string #1630

Merged
merged 6 commits into from
Aug 11, 2021
Merged

Conversation

xiao-lix
Copy link
Contributor

@xiao-lix xiao-lix commented Aug 10, 2021

To address this issue: Convert undefined to blank in customDimensions #1471

Solution: Add a sender configuration convertUndefined that customer can set custom defined value and convert undefined field to the value they need.

Sample Usage:

  • AI set up:
const ai = new ApplicationInsights({
    config: {
        instrumentationKey: '<YOUR_IKEY>',
        maxBatchInterval: 100,
        disableFetchTracking: false,
        convertUndefined: 'test'
    }
});
ai.loadAppInsights();
  • send a event track:
    ai.trackEvent({name: "test-event", properties: {test2: undefined}});
  • without the configuration convertUndefined payload :
    image
  • with configuration convertUndefined payload:
    image

@xiao-lix xiao-lix requested a review from MSNev August 10, 2021 22:52
@MSNev MSNev added this to the 2.x.x (Next Release) milestone Aug 10, 2021
@xiao-lix xiao-lix merged commit a610015 into master Aug 11, 2021
@xiao-lix xiao-lix deleted the lxiao/custom branch August 11, 2021 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants