npm package diff
Package: @forge/metrics
Versions: 0.2.29-next.0-experimental-beb5acf - 0.3.0-next.1
Modified: package/package.json
Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
{
"name": "@forge/metrics",
- "version": "0.2.29-next.0-experimental-beb5acf",
+ "version": "0.3.0-next.1",
"description": "Forge internal metrics",
"author": "Atlassian",
"license": "SEE LICENSE IN LICENSE.txt",
"main": "out/index.js",
@@ -11,9 +11,9 @@
"clean": "rm -rf ./out && rm -f tsconfig.tsbuildinfo",
"compile": "tsc -b -v"
},
"dependencies": {
- "@forge/api": "5.2.0-next.0-experimental-beb5acf",
+ "@forge/api": "5.2.0-next.0",
"@forge/runtime": "5.10.7",
"@forge/util": "1.4.8"
},
"publishConfig": {
Modified: package/CHANGELOG.md
Index: package/CHANGELOG.md
===================================================================
--- package/CHANGELOG.md
+++ package/CHANGELOG.md
@@ -1,12 +1,11 @@
# @forge/metrics
-## 0.2.29-next.0-experimental-beb5acf
+## 0.3.0-next.1
-### Patch Changes
+### Minor Changes
-- Updated dependencies [04ab98e]
- - @forge/[email protected]
+- d69fc1c: Update readme for custom metrics EAP
## 0.2.29-next.0
### Patch Changes
Modified: package/README.md
Index: package/README.md
===================================================================
--- package/README.md
+++ package/README.md
@@ -1,7 +1,7 @@
-# Forge internal metrics
+# Forge custom metrics
-Internal metrics methods. Use it at your own risk.
+See [Forge custom metrics](https://developer.atlassian.com/platform/forge/manage-custom-metrics/) for details on setup, use and visualising custom metrics instrumented in your forge app on [developer console](https://developer.atlassian.com/console/myapps)
## Requirements
See [Set up Forge](https://developer.atlassian.com/platform/forge/set-up-forge/) for details of the software required to develop Forge apps.
@@ -13,11 +13,21 @@
```
import { internalMetrics } from '@forge/metrics';
+export const run = async (payload, context) => {
++ const counter = internalMetrics.counter('jiraActions'); // Name should exactly match as registered in developer console
++
++ const jiraIssues = fetch(...);
++
++ for (const issue of jiraIssues) {
++ counter.incr(); // Increment by 1
++ // Or increment by a specific value
++ counter.incrBy(value);
++ }
++};
+
```
-See [Runtime API reference](https://developer.atlassian.com/platform/forge/runtime-api-reference/) for details of the methods available and how to use them.
-
## Support
See [Get help](https://developer.atlassian.com/platform/forge/get-help/) for how to get help and provide feedback.