Skip to content

Add server telemetry with v2 schema#135

Merged
sangonzal merged 5 commits intodevfrom
sagonzal/serverTelemetryV2
Feb 21, 2020
Merged

Add server telemetry with v2 schema#135
sangonzal merged 5 commits intodevfrom
sagonzal/serverTelemetryV2

Conversation

@sangonzal
Copy link
Copy Markdown
Contributor

No description provided.


if(isInteractionRequired(errorResponse.subError)){
throw new MsalInteractionRequiredException(errorResponse, httpResponse.getHeaderMap());
return new MsalInteractionRequiredException(errorResponse, httpResponse.getHeaderMap());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

return [](start = 16, length = 6)

? - is the exception thrown somewhere else?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes. MsalServiceExceptionFactory should only create exceptions. This was a bug.

errorSegmentBuilder.append(SCHEMA_COMMA_DELIMITER);
}

it.remove();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems like you are deleting the requests one at a time, would it make sense to only clear after a the request is successfully sent?
also what happens if there are 2 requests going on a the same time? Will the first one here get all the elements and the next request will be waiting until this is complete?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point. I have updated to keep track of requests in progress. In case of HTTP status code 429 or >500, requests are not deleted.

If there are 2 requests going on at the same time, for the same client application object, the first one will get all of the elements (up to 4kb of data), and flush them. The second thread will be blocked. (only while the request header is built). If there is any data left, it will flush that. If not, then it would send a blank previous request header.

@sangonzal sangonzal merged commit 32dee12 into dev Feb 21, 2020
@sangonzal sangonzal deleted the sagonzal/serverTelemetryV2 branch February 12, 2021 02:56
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