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

Add telemetry entries for BinaryFormatter callsites #6969

Merged
merged 9 commits into from
Feb 19, 2021

Conversation

MiYanni
Copy link
Member

@MiYanni MiYanni commented Feb 17, 2021

Related: #6858

The purpose of this PR is to add telemetry logging for all callsites of BinaryFormatter to monitor if they are actually called. Initial testing could only activate one spot, SerializeObject in ResourceSerializationService_Store.vb. All other callsites were not able to be activated with a combination of difference projects and usage of the Resource Editor. Therefore, we are adding telemetry and will monitor if there is any valid usage of this code.

Currently, we only use BinaryFormatter in the AppDesigner and Editors projects. These are both VB projects. There are bits and pieces of code that seems copy-pasted between the two. Here, the Utils file in each project has a TelemetryLogger class. I've added the same functions to each for logging usage of BinaryFormatter. The only difference between the two functions is the telemetry path has the appropriate project, appdesigner and editors respectively.

Unfortunately, the site to access the Telemetry Logger application is down. I'll be testing these changes once that site comes back up. But, I wanted to get feedback ASAP since this is for 16.9.

Edit: Even though the site for the app is down, I pulled the code for the logger, built it, and was able to test my changes. Here is a snippet of the log to show the changes are working as expected:
image
image

Remember, that's the only function I've been able to activate. But the telemetry events use the same function, so I don't expect issues with the other callsites.

Microsoft Reviewers: Open in CodeFlow

@MiYanni MiYanni requested a review from a team as a code owner February 17, 2021 23:20
…lemetry logging before BinaryFormatter calls in callsites. Used const strings for event and property name creation in each TelemetryLogger class.
@MiYanni
Copy link
Member Author

MiYanni commented Feb 18, 2021

After the changes above, the appropriate properties are still being recorded.
image
image

@MiYanni MiYanni changed the base branch from dev16.9.x to main February 19, 2021 20:23
@MiYanni MiYanni merged commit 9fd805b into dotnet:main Feb 19, 2021
@ghost ghost added this to the 16.10 milestone Feb 19, 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.

6 participants