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 telemetry calls #124

Merged
merged 1 commit into from
Mar 29, 2023
Merged

Conversation

vineeththomasalex
Copy link
Contributor

Summary of the pull request

Fixes Telemetry calls for DevId.

References and relevant issues

#86

Detailed description of the pull request / Additional comments

Telemetry write calls should have Tagging as a field to be uploaded to Microsoft servers. Without tagging, the events will be blocked locally.

Validation steps performed

Ran Unstub.ps1 and ran TRTT locally to verify that the events show up locally.

PR checklist

  • Closes #xxx
  • Tests added/passed
  • Documentation updated

@@ -2,6 +2,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#define TELEMETRYEVENTSOURCE_PUBLIC
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change is only to make it build correctly locally. With Unstub.ps1, this file is removed.

@@ -28,7 +28,11 @@ public static void AccountStartupEvent(string eventName, string providerName, Li
}

// TODO: Instead of LoginId, hash a globally unique id of DeveloperId (like url)
LoggerFactory.Get<ILogger>().Log($"{eventName}", LogLevel.Critical, $"{telemetryMessage}");
LoggerFactory.Get<ILogger>().Log($"{eventName}", LogLevel.Critical, new
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we make this a part of the api itself? So the WriteTelemetryEvent function can log this object. And we can set the the “field1” field to the object argument that is passed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since this is the standard way I see other projects use this, I imagine there's a reason. But I don't know, maybe we can have an intermediate helper API. I wouldn't change DevHome.Telemetry project though, since that seems to be standard.

@vineeththomasalex
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vineeththomasalex vineeththomasalex merged commit 4afeaa6 into main Mar 29, 2023
@vineeththomasalex vineeththomasalex deleted the user/vineeththomasalex/TelemetryFix branch March 29, 2023 08:02
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