-
Notifications
You must be signed in to change notification settings - Fork 18
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
fix: add telemetry headers for appbase users only #83
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Share a demo, how did you test the telemetry header?
src/core/api/getSuggestionsv3Api.js
Outdated
@@ -23,11 +23,22 @@ function getSuggestionsv3Api(query, settings) { | |||
settings: parsedSettings, | |||
query, | |||
}; | |||
const headers = {}; | |||
|
|||
Object.assign(headers, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mohdashraf010897 Use a utility method to get telemetry headers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay!
@@ -9,20 +9,16 @@ import { btoa, removeUndefined } from '../../utils/index'; | |||
* @param {String} args.path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have changes in this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I needed to pass headers(x-search-client
) that were specific to certain methods calling the fetch function, so added a key called headers
PR Type
Bug
Description:
Test Cases:
![image](https://user-images.githubusercontent.com/57627350/137187247-9c258541-04d2-4d14-8798-2b9808d7bb20.png)