Conversation
jonnyhork
left a comment
There was a problem hiding this comment.
I ran into a build error with npm run vscode:bundle, Claude offered some notes:
npm run vscode:bundle fails because the PR imports o11y_schema/sf_pdp in o11yReporter.ts and o11ySpanExporter.ts, but the o11y_schema package does not export sf_pdp. The Jest mock at config/__mocks__/o11y_schema_sf_pdp.js makes unit tests pass; esbuild fails when bundling extensions.
Fix: Add an alias in the bundle configs so the import resolves to the existing mock at bundle time:
scripts/bundling/web.mjs— add tocommonConfigBrowser.alias:
'o11y_schema/sf_pdp': join(__dirname, '../config/__mocks__/o11y_schema_sf_pdp.js'),scripts/bundling/node.mjs— importpath/joinand add analiasblock:
alias: {
'o11y_schema/sf_pdp': join(__dirname, '../config/__mocks__/o11y_schema_sf_pdp.js'),
}Note: The mock exports { pdpEventSchema: {} }. Verify that @salesforce/o11y-reporter's logEventWithSchema works at runtime with this schema when running the web extension.
packages/salesforcedx-vscode-services/src/observability/appInsights.ts
Outdated
Show resolved
Hide resolved
packages/salesforcedx-vscode-services/src/observability/appInsights.ts
Outdated
Show resolved
Hide resolved
| contextName: 'orgId::devhubId', | ||
| contextValue: `${orgId}::${devHubId}` |
There was a problem hiding this comment.
If these orgId and deHubId are not defined, we would still send undefined:undefined right?
Is there a way to omit the property if not defined instead? Not a big deal, but undefined tends to feel like an error to me or and possibly others.
There was a problem hiding this comment.
no, they show up as empty strings because of line 103/105
There was a problem hiding this comment.
you're going to love TS! because the types on the pft method are string for those props, it won't let you pass in undefined. You don't have to worry about stuff like that.
[there's also an eslint rule to keep people from using null/undefined stuff in template literals...we don't have it on but we could]
There was a problem hiding this comment.
ah those lines were hidden/collapsed by GitHub...
|
You demo video looked good in superset, I did not look for events myself, I have used Superset before but I'd have to dig up the links and query etc. |
oh, that was interesting. I got it to work by unpinning the o11y versions (now |
jonnyhork
left a comment
There was a problem hiding this comment.
Bundling work for me now.
| contextName: 'orgId::devhubId', | ||
| contextValue: `${orgId}::${devHubId}` |
There was a problem hiding this comment.
ah those lines were hidden/collapsed by GitHub...
What does this PR do?
send telemetry via o11y for PFT
records only commandExecution
sets the endpoint/PFT id for all of our extensions
support for 2PP extensions is them adding the correct props to pjson
What issues does this PR fix or reference?
@W-21233151@
QA notes: be sure to deactivate dev mode for testing locally