-
Notifications
You must be signed in to change notification settings - Fork 299
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
Make telemetry use platform only. #10437
Conversation
Did telemtry.md get removed completely? I think Soojin still finds that file useful |
There's also a husky pre-commit check that generates that file, maybe that ran and deleted everything after this change? |
TELEMETRY.md
Outdated
@@ -2,9498 +2,3 @@ | |||
|
|||
Expand each section to see more information about that event. | |||
|
|||
<details> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah looks like telemetry generation is broken. You likely need to change the telemetry generator too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the generator fails to work after moving files around, fix it now.
@@ -95,3 +112,1229 @@ export interface IInterpreterPackages { | |||
getPackageVersion(interpreter: PythonEnvironment, packageName: string): Promise<string | undefined>; | |||
trackPackages(interpreterUri: InterpreterUri, ignoreCache?: boolean): void; | |||
} | |||
|
|||
export interface IEventNamePropertyMapping { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah the telemetry generator has to look here instead of index.ts for the telemetry information. That's why telemetry.md is empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See this file here:
if (refNode && r.fileName.endsWith('src/telemetry/index.ts')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍺 thanks!
Codecov Report
@@ Coverage Diff @@
## main #10437 +/- ##
======================================
- Coverage 70% 70% -1%
======================================
Files 478 480 +2
Lines 28956 28971 +15
Branches 4859 4859
======================================
+ Hits 20535 20540 +5
- Misses 6512 6528 +16
+ Partials 1909 1903 -6
|
import { INotebookControllerManager } from '../types'; | ||
import { IInstaller, Product } from '../../kernels/installer/types'; | ||
import { IVSCodeNotebookController } from '../controllers/types'; | ||
import { trackKernelResourceInformation } from '../../kernels/telemetry/helper'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A side effect is, stuff that didn't depend on kernels, now pulls in dependency from kernels folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that's what we're trying to fix here, and this PR is just one of many.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DonJayamanne you are right. This particular module InterpreterPackageTracker
needs to read INotebookControllerManager
, ./src/kernels
, and ./src/telemetry
. The best place for it is probably out of./src/notebooks
and placed in a folder where we have all the moduels that glue things together.
Re #10152
Attempt to enforce using
platform
modules only intelemetry
. The PR includes two changes:notebooks/kernel
IEventNamePropertyMapping
with the rest of basic helpers intelemetry
. Make sure we only importplatform
intelemetry
, except `IEventNamePropertyMappingThe reason
IEventNamePropertyMapping
is an exception is this mapping is used to track all our telemetry points and they also serve type checkingWe will check
eventValue
againstIEventNamePropertyMapping[eventName)
. This means current approach will have to import types from all other modules. To move off this we would need to a different approach of type checking, for examplewhich won't require us to register all the typings in
IEventNamePropertyMapping
. Considering this is a rather big change and would also require changes for our tooling, I'll keep layer breaking imports in this file only.package-lock.json
has been regenerated by runningnpm install
(if dependencies have changed).