add backticks for code blocks
This commit is contained in:
parent
2ed277dd96
commit
2e7c94c970
|
|
@ -13,7 +13,9 @@ Enter telemetry — by automatically collecting statistics and/or errors, you ca
|
|||
|
||||
[Azure application insights](https://azure.microsoft.com/en-us/services/application-insights/) makes this collection very simple (and free):
|
||||
|
||||
```
|
||||
npm install [vscode-extension-telemetry](https://github.com/Microsoft/vscode-extension-telemetry) --save
|
||||
```
|
||||
|
||||
If you want a real-world example of its useage you can take a look at how I use it in [AREPL-vscode](https://github.com/Almenon/AREPL-vscode/blob/master/src/telemetry.ts).
|
||||
|
||||
|
|
@ -29,21 +31,27 @@ distinct users, ordered by last use date.
|
|||
|
||||
Some other useful queries:
|
||||
|
||||
```
|
||||
// heaviest users by avg time spent using extcustomEvents |
|
||||
where timestamp < now() and name=="almenon.arepl/closed" |
|
||||
summarize timeOpen=avg(todouble(customDimensions.timeSpent)) by cloud\_RoleInstance | order by timeOpen
|
||||
```
|
||||
|
||||
* * *
|
||||
|
||||
```
|
||||
// most frequent users by number of times openedcustomEvents |
|
||||
where timestamp < now() and name=="almenon.arepl/closed" |
|
||||
summarize numEvents=count(iKey) by cloud\_RoleInstance | order by numEvents
|
||||
```
|
||||
|
||||
* * *
|
||||
|
||||
You can even project your results into graphs
|
||||
|
||||
```
|
||||
customEvents | where name == 'almenon.arepl/closed' | summarize count() by client\_CountryOrRegion | render piechart
|
||||
```
|
||||
|
||||
<img class="cp t u gw ak" src="https://miro.medium.com/max/1448/1\*Su93PsHonYivRH\_b8ktvKw.png" width="724" height="601" role="presentation"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,13 @@ turndownService.addRule('noHiddenImages', {
|
|||
}
|
||||
})
|
||||
|
||||
turndownService.addRule('code blocks', {
|
||||
filter: 'pre',
|
||||
replacement: function (content, node) {
|
||||
return "```\n" + content + "\n```"
|
||||
}
|
||||
})
|
||||
|
||||
// todo: filter out profile header
|
||||
// (right below title, the div with author profile pic and name and time to read article)
|
||||
// unfortunately Medium uses randomly generated CSS properties which makes it hard to
|
||||
|
|
|
|||
Loading…
Reference in New Issue