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

Populate Website ID in context for desktop extension #853

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gshivi
Copy link
Contributor

@gshivi gshivi commented Feb 20, 2024

Description

Populate context object in desktop extension - website ID field to be logged for every trace.
The value for this field will be logged based on the active file in vs code.
If no active file or issue in finding root folder for the data - empty string gets logged as website id.

@gshivi gshivi requested review from a team as code owners February 20, 2024 08:40
name: OneDSCollectorEventName.VSCODE_EVENT,
data: {
/// Trace info log
public async traceInfo(eventName: string, eventInfo?: object, measurement?: object) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't make traceInfo as async. Neither putting this kind of condition is generic. This method should be as simple as calling 1DSLogger.

Copy link
Contributor Author

@gshivi gshivi Feb 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading website Id from pac data is an async operation. This can't be put in method populateCommonAttributes function - as this function is itself returning a function & it can't be async by definition - else gives error.

As the requirement is - for every trace being logged websiteId for the activeEditor needs to be logged. This can't be a one time-thing. Will sync offline more on this.

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