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

fix: add telemetry headers for appbase users only #83

Merged
merged 5 commits into from
Oct 14, 2021

Conversation

mohdashraf010897
Copy link
Member

PR Type Bug

Description:

Test Cases:
image

Copy link
Contributor

@bietkul bietkul left a 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?

@@ -23,11 +23,22 @@ function getSuggestionsv3Api(query, settings) {
settings: parsedSettings,
query,
};
const headers = {};

Object.assign(headers, {
Copy link
Contributor

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.

Copy link
Member Author

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
Copy link
Contributor

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?

Copy link
Member Author

@mohdashraf010897 mohdashraf010897 Oct 14, 2021

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

@bietkul bietkul merged commit 2b2fbc3 into develop Oct 14, 2021
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