@forge/metrics 0.2.29-next.0-experimental-beb5acf → 0.3.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -3
- package/README.md +14 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
# @forge/metrics
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 0.3.0-next.2
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
7
|
+
- 1a5e89d: Update link in readme for EAP docs
|
|
8
|
+
|
|
9
|
+
## 0.3.0-next.1
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- d69fc1c: Update readme for custom metrics EAP
|
|
9
14
|
|
|
10
15
|
## 0.2.29-next.0
|
|
11
16
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Forge
|
|
1
|
+
# Forge custom metrics
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
See [Forge custom metrics](https://developer.atlassian.com/platform/forge/monitor-custom-metrics/) for details on setup, use and viewing custom metrics instrumented in your forge app on [developer console](https://developer.atlassian.com/console/myapps)
|
|
4
4
|
|
|
5
5
|
## Requirements
|
|
6
6
|
|
|
@@ -14,9 +14,19 @@ In your Forge app, include the following:
|
|
|
14
14
|
|
|
15
15
|
import { internalMetrics } from '@forge/metrics';
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
export const run = async (payload, context) => {
|
|
18
|
+
+ const counter = internalMetrics.counter('jiraActions'); // Name should exactly match as registered in developer console
|
|
19
|
+
+
|
|
20
|
+
+ const jiraIssues = fetch(...);
|
|
21
|
+
+
|
|
22
|
+
+ for (const issue of jiraIssues) {
|
|
23
|
+
+ counter.incr(); // Increment by 1
|
|
24
|
+
+ // Or increment by a specific value
|
|
25
|
+
+ counter.incrBy(value);
|
|
26
|
+
+ }
|
|
27
|
+
+};
|
|
18
28
|
|
|
19
|
-
|
|
29
|
+
```
|
|
20
30
|
|
|
21
31
|
## Support
|
|
22
32
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/metrics",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-next.2",
|
|
4
4
|
"description": "Forge internal metrics",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"compile": "tsc -b -v"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@forge/api": "5.2.0-next.0
|
|
15
|
+
"@forge/api": "5.2.0-next.0",
|
|
16
16
|
"@forge/runtime": "5.10.7",
|
|
17
17
|
"@forge/util": "1.4.8"
|
|
18
18
|
},
|